hello my website is
password : Lac1234
due to design wants we removed the the footer from the home page therefore we don’t have an the language selector.
i would like to put the language selector in the header next to the cart.
thanks
hello my website is
password : Lac1234
due to design wants we removed the the footer from the home page therefore we don’t have an the language selector.
i would like to put the language selector in the header next to the cart.
thanks
Hi @LAC1993 , kindly checkout the below given videos:
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
in the video he is showing how to implement a flag into the header i would like to take the corrects language selector
Hi @LAC1993 ,
Please send me the code of header.liquid and footer.liquid file, I will check and guide it for you
@LAC1993 just a brief reminder that the legal pages (in France) must be available throughout the complete shop. Therefore, you should think about not removing the footer…
i have in all pages.
Hi @LAC1993 ,
Please send me the code for these 2 files, I will help you check it
@LAC1993 all, just the homepage is missing the legal links
{% comment %} Settings {% endcomment %}
{%- liquid
assign header_sticky = section.settings.header_sticky
assign header_transparent = section.settings.header_transparent
assign text_color = section.settings.text_color
assign style = section.settings.style
assign shop_name = shop.name | escape
assign cart_item_count = cart.item_count
if cart_item_count > 9
assign cart_item_count = ‘9+’
endif
assign header_position = ‘relative’
capture header_class
echo 'site-header header–is-standard ’
echo ‘header–’ | append: style
if header_transparent
echo ’ header–transparent’
endif
if header_sticky
echo ’ header–sticky’
assign header_position = ‘absolute’
endif
unless logo_default or logo_transparent
echo ’ header–no-logo’
endunless
endcapture
-%}
{%- comment -%} Check if there is only one logo set and show it always {%- endcomment -%}
{%- liquid
assign logo = section.settings.logo
assign logo_transparent = section.settings.logo_transparent
assign logo_height_small = 40
assign logo_width = section.settings.logo_max_width
assign logo_width_x2 = logo_width | times: 2
assign sizes = logo_width | append: ‘px’
assign alt = logo.alt | default: shop.name | strip_html | escape
assign width = logo_width_x2
assign has_logo_image = false
assign single_logo = false
if logo and logo_transparent == blank
assign single_logo = true
elsif logo == blank and logo_transparent
assign single_logo = true
endif
-%}
{%- capture logo_default -%}
{%- if logo != blank -%}
{%- liquid
assign logo_classes = ‘logo__image logo__image–default’
if single_logo
assign logo_classes = logo_classes | append: ’ logo__image–single’
endif
assign logo_height = logo_width | divided_by: logo.aspect_ratio | round
if logo_height < 40
assign logo_height_small = logo_height
endif
assign logo_width_small = logo_height_small | times: logo.aspect_ratio | round
assign widths = logo_width_small | append: ', ’ | append: logo_width | append: ', ’ | append: logo_width_x2
render ‘image’ image: logo, loading: ‘eager’, width: width, widths: widths, sizes: sizes, alt: alt, modifier: logo_classes, show_backfill: false
-%}
{%- style -%}
.logo__image–default { width: {{ logo_width }}px; }
.header–has-scrolled .logo__image–default { width: {{ logo_width_small }}px; }
{%- endstyle -%}
{%- endif -%}
{%- endcapture -%}
{%- capture logo_transparent -%}
{%- if logo_transparent != blank -%}
{%- liquid
assign logo_classes = ‘logo__image logo__image–transparent’
if single_logo
assign logo_classes = logo_classes | append: ’ logo__image–single’
endif
assign logo_height = logo_width | divided_by: logo_transparent.aspect_ratio | round
if logo_height < 40
assign logo_height_small = logo_height
endif
assign logo_width_small = logo_height_small | times: logo_transparent.aspect_ratio | round
assign widths = logo_width_small | append: ', ’ | append: logo_width | append: ', ’ | append: logo_width_x2
render ‘image’ image: logo_transparent, loading: ‘eager’, width: width, widths: widths, sizes: sizes, alt: alt, modifier: logo_classes, show_backfill: false
-%}
{%- style -%}
.logo__image–transparent { width: {{ logo_width }}px; }
.header–has-scrolled .logo__image–transparent { width: {{ logo_width_small }}px; }
{%- endstyle -%}
{%- endif -%}
{%- endcapture -%}
{%- if logo_default != blank or logo_transparent != blank -%}
{%- assign has_logo_image = true -%}
{%- endif -%}
{%- style -%}
:root { --header-position: {{ header_position }}; }
{%- if text_color != ‘rgba(0,0,0,0)’ and text_color != blank -%}
.header–transparent.site-header { --text: {{ text_color }} }
{%- endif -%}
{%- unless header_transparent -%}
@media screen and (max-width: 479px) {
.shopify-section:first-child .banner–transparent-header,
.template-page .banner–transparent-header { --header-initial-height: 25px; }
}
{%- endunless -%}
{%- endstyle -%}
{%- capture search_popdown -%}
{%- render ‘header-search-popdown’ -%}
{%- if logo_default != blank -%}
{{- logo_default -}}
{%- endif -%}
{%- else -%}
{{ shop_name }}
{%- endif -%}
{%- if shop.customer_accounts_enabled -%}
{%- render ‘icon-user’ -%}
{%- endif -%}
{%- if settings.show_search -%}
{{ search_popdown }}
{%- endif -%}
{% comment %} Site Navigation {% endcomment %}
{%- render 'icon-close' -%}{%- if template != ‘cart’ and settings.enable_ajax_cart -%}
{%- if template.name == ‘index’ -%}
{%- assign potential_action_target = shop.url | append: routes.search_url | append: “?q={search_term_string}” -%}
{%- endif -%}
{% schema %}
{
“name”: “Header”,
“class”: “shopify-section-header”,
“settings”: [
{
“type”: “checkbox”,
“id”: “header_sticky”,
“label”: “Enable sticky header”,
“default”: true
},
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Logo”,
“info”: “Used on the other pages and on scroll when the header is sticky”
},
{
“type”: “range”,
“id”: “logo_max_width”,
“label”: “Width”,
“info”: “Max logo height is 100px”,
“min”: 50,
“max”: 400,
“default”: 100,
“step”: 5,
“unit”: “px”
},
{
“type”: “header”,
“content”: “Menus”
},
{
“type”: “link_list”,
“id”: “menu_list”,
“label”: “Primary menu”
},
{
“type”: “header”,
“content”: “Navigation settings”
},
{
“type”: “select”,
“id”: “style”,
“label”: “Style”,
“default”: “logo-center-links-left”,
“options”: [
{ “value”: “logo-left-links-right”, “label”: “Menu right, logo left” },
{ “value”: “logo-left-links-center”, “label”: “Menu center, logo left” },
{ “value”: “logo-center-links-left”, “label”: “Menu left, logo center” },
{ “value”: “logo-center-links-center”, “label”: “Menu center, logo center” }
]
},
{
“type”: “header”,
“content”: “Mega menu”
},
{
“type”: “image_picker”,
“id”: “meganav_image”,
“label”: “Image”,
“info”: “Recommended size: 500 x 800 px”
},
{
“type”: “range”,
“id”: “image_aspect_ratio”,
“label”: “Image aspect ratio”,
“min”: 0.5,
“max”: 1.5,
“step”: 0.1,
“unit”: “:1”,
“default”: 1
},
{
“type”: “text”,
“id”: “meganav_image_heading”,
“label”: “Heading”
},
{
“type”: “url”,
“id”: “meganav_image_link”,
“label”: “Link”
},
{
“type”: “header”,
“content”: “Transparent header”
},
{
“type”: “checkbox”,
“id”: “header_transparent”,
“label”: “Enable transparent header”,
“default”: true,
“info”: “If only the first section has fullscreen background image or video.”
},
{
“type”: “color”,
“id”: “text_color”,
“label”: “Text color”,
“default”: “#ffffff”
},
{
“type”: “image_picker”,
“id”: “logo_transparent”,
“label”: “Logo”,
“info”: “Used on Home and Collection pages when the header is transparent”
}
],
“enabled_on”: {
“groups”: [“header”]
}
}
{% endschema %}
footer :
{%- liquid
assign color_footer_text = section.settings.color_footer_text
assign color_footer_bg = section.settings.color_footer_bg
assign color_footer_bottom_bg = section.settings.color_bottom_bar_bg
assign color_footer_bottom_contrast = color_footer_bottom_bg | color_contrast: color_footer_text
if color_footer_bottom_contrast < 4.5
assign color_footer_bottom_bg_lightness = color_footer_bottom_bg | color_brightness
if color_footer_bottom_bg_lightness < 50
assign color_footer_bottom_text = color_footer_bottom_bg | color_lighten: 70
else
assign color_footer_bottom_text = color_footer_bottom_bg | color_darken: 70
endif
else
assign color_footer_bottom_text = color_footer_text | color_modify: ‘alpha’, 0.7
endif
-%}
{%- style -%}
:root {
–COLOR-FOOTER-TEXT: {{ color_footer_text }};
–COLOR-FOOTER-PLACEHOLDER-TEXT: {{ color_footer_text | color_modify: ‘alpha’, 0.5 }};
–COLOR-FOOTER-BG: {{ color_footer_bg }};
–COLOR-FOOTER-BG-HOVER: {{ color_footer_text | color_modify: ‘alpha’, 0.05 }};
–COLOR-FOOTER-BOTTOM-TEXT: {{ color_footer_bottom_text }};
–COLOR-FOOTER-BOTTOM-BG: {{ color_footer_bottom_bg }};
–COLOR-FOOTER-BOTTOM-BG-HOVER: {{ color_footer_bottom_text | color_modify: ‘alpha’, 0.05 }};
–COLOR-FOOTER-BOTTOM-BORDER: {{ color_footer_bottom_text | color_modify: ‘alpha’, 0.1 }};
–footer-grid: repeat({{ section.blocks.size }}, minmax(0, auto));
}
{%- endstyle -%}
{%- liquid
capture top_footer_style
echo ‘–PT:’ | append: section.settings.padding_top | append: ‘px;’
endcapture
capture bottom_footer_style
echo ‘–PB:’ | append: section.settings.padding_bottom | append: ‘px;’
endcapture
-%}
{%- case block.type -%}
{%- when ‘logo’ -%}
render ‘image’ image: block.settings.logo, width: logo_width_x2, widths: widths, sizes: sizes, alt: alt
-%}
{%- else -%}
{%- when ‘menu’ -%}
{%- assign menu = block.settings.menu -%}
{%- assign title = block.settings.title -%}
{{ title }}
{%- endif -%}{%- if menu != blank -%}
{%- when ‘text’ -%}
{{ title }}
{%- endif -%}{%- if text != blank -%}
{%- when ‘newsletter’ -%}
{%- if title != blank -%}
{{ title }}
{%- endif -%}{%- if content != blank -%}
{{ content }}
{%- render ‘newsletter’ -%}
{%- endcase -%}
{%- endfor -%}
{% comment %} Bottom bar - Payment icons, text, copyright, social icons, menu {% endcomment %}
{%- liquid
assign menu = section.settings.menu
assign show_social_icons = section.settings.show_social_icons
assign enable_follow_on_shop = section.settings.enable_follow_on_shop
-%}
{%- if show_social_icons or shop.features.follow_on_shop? and enable_follow_on_shop -%}
{%- render ‘social-links’ -%}
{%- endif -%}
{%- if menu -%}
{%- if linklists[menu].links != empty -%}
© {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}
{{ powered_by_link }}
{% schema %}
{
“name”: “Footer”,
“max_blocks”: 5,
“settings”: [
{
“type”: “header”,
“content”: “Colors”
},
{
“type”: “color”,
“id”: “color_footer_text”,
“label”: “Text”,
“default”: “#222222”
},
{
“type”: “color”,
“id”: “color_footer_bg”,
“label”: “Background”,
“default”: “#ffffff”
},
{
“type”: “color”,
“id”: “color_bottom_bar_bg”,
“label”: “Bottom bar background”,
“default”: “#fafafa”
},
{
“type”: “header”,
“content”: “Bottom bar”
},
{
“type”: “checkbox”,
“id”: “show_payment_icons”,
“label”: “Show payment icons”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_social_icons”,
“label”: “Show social icons”,
“default”: true
},
{
“type”: “link_list”,
“id”: “menu”,
“label”: “Choose Menu”,
“default”: “footer”,
“info”: “This menu won’t show dropdown items”
},
{
“type”: “header”,
“content”: “Language selector”,
“info”: “To add a language, go to your language settings.”
},
{
“type”: “checkbox”,
“id”: “show_locale_selector”,
“label”: “Show language selector”,
“default”: true
},
{
“type”: “header”,
“content”: “Country/Region selector”,
“info”: “To add a country/region, go to your markets settings.”
},
{
“type”: “checkbox”,
“id”: “show_country_selector”,
“label”: “Show country/region selector”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_country_name”,
“label”: “Show country name”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “show_country_flag”,
“label”: “Show country flag”,
“default”: true
},
{
“type”: “header”,
“content”: “Follow on Shop”,
“info”: “Display follow button for your storefront on the Shop app. Learn more”
},
{
“type”: “checkbox”,
“id”: “enable_follow_on_shop”,
“default”: false,
“label”: “Enable Follow on Shop”
},
{
“type”: “header”,
“content”: “Section padding”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 1,
“unit”: “px”,
“label”: “Padding top”,
“default”: 30
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 1,
“unit”: “px”,
“label”: “Padding bottom”,
“default”: 20
}
],
“blocks”: [
{
“type”: “logo”,
“name”: “Logo”,
“limit”: 1,
“settings”: [
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Logo”
},
{
“type”: “range”,
“id”: “logo_width”,
“min”: 60,
“max”: 180,
“step”: 10,
“unit”: “px”,
“label”: “Logo width”,
“default”: 150
},
{
“type”: “checkbox”,
“id”: “mobile_hide_block”,
“label”: “Hide block on mobile”,
“default”: false
}
]
},
{
“type”: “menu”,
“name”: “Menu”,
“limit”: 5,
“settings”: [
{
“type”: “link_list”,
“id”: “menu”,
“default”:“main-menu”,
“label”: “Choose Menu”,
“info”: “This menu won’t show dropdown items”
},
{
“type”: “text”,
“id”: “title”,
“label”: “Heading”
},
{
“type”: “checkbox”,
“id”: “mobile_hide_block”,
“label”: “Hide block on mobile”,
“default”: false
}
]
},
{
“type”: “text”,
“name”: “Text”,
“limit”: 5,
“settings”: [
{
“type”: “text”,
“id”: “title”,
“label”: “Title”,
“default”: “Information”
},
{
“type”: “richtext”,
“id”: “text”,
“label”: “Text”,
“default”:“
This text block is a great place to discuss shipping policies, or terms and conditions info.
”Hi @LAC1993 ,
Please send me more code of header.liquid file, I will check it
Hi @LAC1993 ,
Please go to header.liquid file and add code here:
Code:
{%- render 'cross-border' -%}