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

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!