Change language code name to E instead of ENG or English

Topic summary

Goal: shorten language names in a Shopify store’s selector to single letters (English → “E”, French → “F”), avoiding duplicates in the dropdown.

Issue: initial attempt led to repeated letters in the dropdown list.

Proposed solution (theme code edits in Online Store > Themes > Edit code > language-localization.liquid):

  • Targeted approach (EN/FR only):
    • For the currently selected language (within the element with class “disclosure__button”): use a condition on localization.language.iso_code to output “E” for en and “F” for fr; otherwise show the capitalized endonym name.
    • For dropdown items (near the line rendering the checkmark icon): apply the same condition on language.iso_code.
  • General approach (all languages):
    • For both selected and dropdown items: take the first character of the language’s endonym_name and convert it to uppercase.

Notes: screenshots illustrate exactly where to paste each snippet. The final example shows “E” and “F” correctly for English and French.

Status: solution provided; awaiting confirmation from the requester, so resolution is pending.

Summarized with AI on January 1. AI used: gpt-5.

Hello Friends,

I have 2 language in my shopify store.

I want to change the English language name from English or ENG to " E"

I just need letter E which is short for English

I would appreciate if you can provide code link to added to my store?

Thank you

1 Like

@wo Thanks for your response.

I added the code but it have some issue , the drop down language list have repeated Letter

If i have French and English I want to French to be F and English to be E , In the drop down list should have F and E,

can you adjust the code ?

Thank you

@usershop2024 Please follow the below steps to change the language name. Let me know whether it is helpful for you.

  1. From admin, go to “Online Store” → “Themes”.
  2. Click action button from the current theme and select “Edit code”.
  3. Locate “language-localization.liquid” file and follow either a) or b) based on your need.
    a) Follow below steps if you want to update text only for the English and the French languages.
    To change the displaying selected language:
    Find the class “disclosure__button” paste the given code below to it like in the below attached screenshot.
{% if localization.language.iso_code == 'en' %}
    E
{% elsif localization.language.iso_code == 'fr' %}
    F
{% else %}
    {{ localization.language.endonym_name | capitalize }}
{% endif %}

To change the language in the dropdown:
Find the “{%- render ‘icon-checkmark’ -%}” paste the given code below to it like in the below attached screenshot.

{% if language.iso_code == 'en' %}
    E
{% elsif language.iso_code == 'fr' %}
    F
{% else %}
    {{ language.endonym_name | capitalize }}
{% endif %}

b) Follow below steps if you want to update for all the available languages.
To change the displaying selected language:
Find the class “disclosure__button” paste the given code below to it like in the below attached screenshot.

{% assign language_title = localization.language.endonym_name | split: '' | first %}
{{ language_title | upcase }}

To change the language in the dropdown:
Find the “{%- render ‘icon-checkmark’ -%}” paste the given code below to it like in the below attached screenshot.

{% assign language_title = language.endonym_name | split: '' | first %}
{{ language_title | upcase }}

  1. Then, the final output of the language selector dropdown will be like.

Please provide your support by click “Like” and “Accepted” if our solution works for you. Thanks for your support.

2 Likes