Jump to content

How to insert language code?


Kleindberg

Recommended Posts

Hello,

 

The English language in Prestashop have an international abbreviation EN,

Russian - RU, France - FR etc. So every language had an own personal code.

 

I want to insert this language code into my template URLs. We write:

{CURRENT-LANUGAGE-CODE}
/img.png

...and get link looks like

en
/img.png

...if customers current language is English.

 

If user switch site language to Russian, links become looks like

ru
/img.png

 

Now I use code {l s='en'} and translate it to get another language, but it's isn't good solution.

What code I must to insert to get current language abbreviation?

Edited by Kleindberg (see edit history)
Link to comment
Share on other sites

  • 4 months later...

Hello,

 

The English language in Prestashop have an international abbreviation EN,

Russian - RU, France - FR etc. So every language had an own personal code.

 

I want to insert this language code into my template URLs. We write:

{CURRENT-LANUGAGE-CODE}
/img.png

...and get link looks like

en
/img.png

...if customers current language is English.

 

If user switch site language to Russian, links become looks like

ru
/img.png

 

Now I use code {l s='en'} and translate it to get another language, but it's isn't good solution.

What code I must to insert to get current language abbreviation?

 

Use (PS_LANG_DEFAULT)

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...