Search code examples
prestashopiso

Show 3 letters in ps language switcher prestashop 1.7


is it possibile in prestashop 1.7.6 to show 3 characters in language switcher? To show 2 caracters iso code I used {$current_language.iso_code} and it works. I nead to show 3 char (eg,: ENG instead of EN).

Thank you


Solution

  • If you want to do it directly in the template file, you can use the language name, truncate it to 3 characters and capitalize it:

    {$current_language.name|upper|truncate:3:'':true}