• Resolved pierrestoffe

    (@pierrestoffe)


    Hi!

    First I have to say Polylang is a tremendous plugin and it’s the first multi-language plugin I actually like using.
    I’m stuck on an small issue though.

    The website I’m working on is for a french-speaking company. A Dutch version and an English one are also available thanks to Polylang. If I’m right, when a visitor does not speak one of these languages, he’s redirected to the default language. So I set the default language to English.

    But by setting the default language to English, it also changed the default language for adding a new post, which I’d prefer it didn’t (I want it to be French by default). Of course the editor still can manually change the post language to French, but I’m sure there’s a way to do it automatically.

    Can somebody help me? Does anybody have a clue how to do it?

    Thanks in advance,
    Pierre

    https://ww.wp.xz.cn/plugins/polylang/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    (@chouby)

    The default language for adding a new post can be set by the admin language filter in the admin bar on top of your screen.

    Thread Starter pierrestoffe

    (@pierrestoffe)

    Hi Chouby,

    Are you talking about this bar? If so, it also hides the content created in other languages, which is not what I’m trying to accomplish.
    I’d like all the content to be listed (whatever the language) and force the default language for a new post to be set to French.

    I understand your solution works though, but I have to put myself in my client’s shoes: they’ve never used WordPress, the interface isn’t that easy to get for a newcomer, they’re stressed by the amount of things they see and the amount of things they have to learn. So even if your solution seems completely natural to us, they surely won’t feel the same 🙂

    Would you have another idea? Thanks for your help!

    Plugin Author Chouby

    (@chouby)

    So you will have to make a custom plugin with something like:

    add_filter('pll_admin_preferred_language', 'my_preferred_language');
    function my_preferred_language($lang) {
      global $polylang;
      return $polylang->model->get_language('fr');
    }

    Thread Starter pierrestoffe

    (@pierrestoffe)

    Thanks a lot! Exactly what I needed.

    Have a nice w-e,
    Pierre

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Different default language for admin’ is closed to new replies.