We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Select different language without redirecting

Hi,

I want to have links in my topbar menu for different languages

Whenever I select a language I want to stay on the same page and just change the language session variable acoordinely

for example I am in the following page /bu/bu and pressed "english"

I want to stay in the same page and just change the language session var



98.9k
Accepted
answer

You can use ajax to set the session variable with the new language but I'm afraid without a redirection the texts would not be translated to the selected language.