How to get the current language used by localizer

hi guys,

i am trying to find out what language the site is using at any given point so i can mark the corresponding language navigation item as active.

if i click lets say on EN while being on the home page in german, obviously i get the ?locale=en in the adress bar after I click, but if i continue surfing in EN, lets say i go to ABOUT, then the ABOUT page keeps showing english, but the URL does not show the locale anymore, it just says /about. in this case, how do i read the current locale?

here is the page i am working on:

Hi @squareclouds-design,

The value will be stored in a PHP session variable so after entering the URL parameter as mentioned, it gets stored and retrieved from there afterward. It won't be visible in the URL, though.

For making the links active in this case, it may be possible to retrieve it from the storage (session) and then display active links based on that.

Do let us know if you manage to work it out :smiley:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.