Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

SHOPIFY LANGUAGE SELECTOR

{% form 'localization' %}
2	
  	<select name="language_code">
3	
    	{% for language in localization.available_languages %}
4	
      	<option value="{{ language.iso_code }}"
5	
        	{%- if language == localization.language %} selected="selected"{% endif %}
6	
      	>
7	
        	{{ language.endonym_name }}
8	
      	</option>
9	
    	{% endfor %}
10	
  	</select>
11	
12	
  	<input type="submit" value="Update">
13	{% endform %}
Source by shopify.dev #
 
PREVIOUS NEXT
Tagged: #SHOPIFY #LANGUAGE #SELECTOR
ADD COMMENT
Topic
Name
3+4 =