Skip to content

Instantly share code, notes, and snippets.

@ashwebstudio
Created April 20, 2020 21:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ashwebstudio/a6d47b88690c6bd7a9eb27b8968972bd to your computer and use it in GitHub Desktop.
Save ashwebstudio/a6d47b88690c6bd7a9eb27b8968972bd to your computer and use it in GitHub Desktop.
TranslatePress Set Language To Cookie
@Ciao121
Copy link

Ciao121 commented Aug 25, 2023

I think I understood where the problem is.
If I am on a page like: https://mysite.com/it/page, $TRP_LANGUAGE is it_IT.
But if I go to the home page WITHOUT THE SLUG (https://mysite.com) $TRP_LANGUAGE revert to en_US. And the same happens with custom pages.
This means that by default TranslatePress does not remember user last visited language. The sell an add on to do that (didn't knew).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment