• Hi, I am using polylang plugin on my site, It is bilingual, czech and english, czech being the default language. I have edited the czech and some of the english messages in plugin administration. I am restricting only some posts with the plugin. I thought that for english posts the plugin will display english messages and for czech the czech ones. But it always uses the czech ones, even for the posts in english language. Oh, and in polylang I have disabled the detect browser language option.

    Is there a way, (can you point me) of how to force the Agegate use the same locale as is current polylang language? Maybe in some hook I can just force it?

    Thanks for any answer and have a nice weekend.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @mouseviator,

    That’s interesting, it should detect the current language and use those messages. What’s your URL structure in polylang?

    A hook is a good idea actually, I may well add one in too.

    Thanks
    Phil

    Plugin Author Phil

    (@philsbury)

    Hi again @mouseviator,

    Just thought that maybe you want to uncheck the box on the advanced tab that says “Use the default language if a translation is missing”. That might solve some of the issues.

    I’ve set up an local version as you describe and it looks to be working as expected.

    If you have a link I can see that’d be useful too.

    Thanks
    Phil

    Thread Starter Mouseviator

    (@mouseviator)

    Hi, my URL structure is custom:
    https://mouseviator.com/%category%/%postname%/

    I tried to disable the “Use default language if translation is missing”, but then I get no text at all.

    I posted the english restricted post here:
    https://mouseviator.com/nezarazene-en/english-agegate-test/
    It should display the english version of the messages, but you can see it does display in czech.

    On this czech post:
    https://mouseviator.com/kresby/divka-z-kalendare/
    it is OK.

    Oh, click the “Ano” button to get through if you don’t understand czech.

    I guess it will be something with the URL format, that there is no language info in the GET parameters maybe? I had the same problem with the disqus plugin which also did not recognize the language automatically (even thought it should). But for that I wrote the hook which forces language based on polylang actual language.

    Thanks and best regards
    Mouseviator

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Force locale’ is closed to new replies.