How to change language selector format from language name to country code?

Topic summary

A user wants to display language codes (e.g., “EN”) instead of full language names (“English”) in their Shopify store’s language selector.

Solution provided:

  • Navigate to theme code editor → Snippets folder → language-localization.liquid file
  • Replace language.endonym_name with language.iso_code
  • To capitalize all letters, change the capitalize tag to upcase

Follow-up issue:
Another user cannot locate the language-localization.liquid file in their theme and wants to change “Română (românia)” to either “Română” or “RO”.

Status: The original issue was resolved successfully. The secondary user’s question about finding the file in their specific theme remains unanswered, though the solution was confirmed working by another participant.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

I want to show only the language code (For example: EN) on my language selector instead of “English”.

How I can change this?

1 Like

Hi @Karolis3

Thank you for reaching out to the shopify community.

To show only language code instead of name, please follow the below steps.

  • Go to your theme code editor and search for file named language-localization.liquid in Snippets folder.
  • Search for language.endonym_name in the file and replace it with language.iso_code
  • Screen shot for reference:-

Now the language name will be replaced by code.

Do give it a try and let me know if this was helpful.

Thanks

1 Like

Thank you! That helped me to change to language code.

Now it looks like this:

How I can capitalize all the letters?

Thanks.

Everything good now, I just changed capitalize tag to to upcase and all the letter now are in upper case.

Thank you very much!

Hi Harsita!

I tried to look for the language-localization.liquid, but unfortunately i wasnțt able to find this anyware.

Could you please help and let me know where to look for?

At the moment the header looks ugly like this and i would love to make some changes. Either change from “Română (românia)” to “Română”, or even better to change it from “Română (românia)” to “RO”.

Thank you very much for your help!
Daniel

It works. Thanks a lot!