Support » Plugin: Import users from CSV with meta » How to import user’s preferred language ?

  • Hi,

    The WP user admin panel allows to set the user’s preferred language.

    Is it possible to import it with your plugin ?

    Thank you in advance for your replay,


Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Javier Carazo



    Do you know how user’s preferred language is saved in database? If yes tell me and we see how it can be done.

    I think it’s just another user meta to import (a column to add to csv file), ‘locale’ seems to be the meta_key.
    Correct ?

    Plugin Author Javier Carazo


    If this is the meta correct… yes.

    I don’t know how it works. I know how my plugin works: new column, new key and if it is correct for your purpose it will work.


    I’m trying to help by doing a test run. I poked around and then saw what happened in the database. Here’s what I found.

    First, “Users” > “Edit User” > “Language” was set to “Site Default”, and in the database dump was this:
    INSERT INTO 'wp_usermeta' VALUES ...,('33','2','locale',''),...;

    Then, “Users” > Edit User -> Language -> (switch to Brazilian Portugese), and in the new database dump showed this:
    INSERT INTO 'wp_usermeta' VALUES ...,('33','2','locale','pt_BR'),...;

    • This reply was modified 1 year, 9 months ago by  mjassen (mjjojo). Reason: correct backticks escape syntax
    Plugin Author Javier Carazo



    Thank you very much!

    So @stephanemartinw the solution is:
    * Column: locale
    * Value: pt_BR

    For example 🙂


    Thank you both for your help!
    I’ve tested and it works.
    Just on thing : on the profile page, at bottom, a :

    Extra profile information
    locale fr_FR

    is added to the page, but is a duplicate info because the preferred language above is correctly filled.
    A way to avoid this ?

    Thanks again.

    Best regards,


    Plugin Author Javier Carazo



    I have to include it as a field that must not be shown.

    In next version it will be included.

    Plugin Author Javier Carazo


    Done 🙂

    Great support! Thank you !

    Plugin Author Javier Carazo


    Please remind the good review or a little donation please 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to import user’s preferred language ?’ is closed to new replies.