Admin Area Language Switching

  1. gautamarya

    I'm wordpress developer.

    I works with client around the world having
    installed wordpress in many language.

    Working with wordpress had been installed in local language is somewhat frustrating and time consuming and that some time leads to cancel the project.

    Is it possible to provide Language translation drop down or some thing only for admin panel like they have in magento?

    I know many plugins are available out there but having these option for developer without requiring to install plugin is very helpful.

    Posted: 5 years ago #
  2. Mihail Semjonov

    If you'r dev you'll understend:

    There's not much code needed..
    You need eathere do the session or make a custom user meta where you'll hold the actual language user is running.

    Making a dropdown menu in navbar is easy ( there's a planty of documentation out there ).

    So, how to find wich languages wp is avilable - scan wp-config/languages/ folder for .mo files if ther's more than 1 than probably u have 2 sets of laangs.

    Store theme to variable ( cache it atc.. )
    use it for dropdown.

    When selecting lenguage do the ajax request where change your session ( or user meta ).

    add a filter 'get_locale' where you'll get the session ( or user meta ) and return it as a value of current language.

    There shouldn't be much code to do all that.

    In WPML ( as i understand ) there's something similar hepening.

    Posted: 5 years ago #
  3. jamiefehr

    I use the polylang plugin to solve this problem. I wish Polylang were wordpress core, it works so great. Each user can then choose the interface language they want in admin and posts can un-obtrusively live in multiple languages.

    Posted: 5 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    0 Votes
  • Status

    This idea is under consideration