Where is the code which defines the language (correct .po file) Membership plugin?

Hello,

So it appears that I have some issue with localizing the Membership plugin. What do I need to edit to change the localization from the default

membership.po

to another .po file. Or cuz I noticed that the .mo file had the us_US designation the same question applies.

I checked the includes and I cannot seem to find the language variable.

I went ahead to try and achieve this with the Codestyling Localization plugin however: “Warning: The actual loaded translation content contains mixed textdomains and is not pure translateable within one textdomain.” which as I can see is due to a few includes – nevertheless I am unable to translate the plugin.

Usefull insight will be greatly appreciated. Thanx

  • consalta.admin
    • WPMU DEV Initiate

    ok… and where do I specify which file is to be used? so there is a us_US .mo but i need to change to say sl_SL or whatever. What bugs me is that there is membership.po and membership-us_US.mo ; what do I need to edit to specify that the plugin should use membership-sl_SL.mo ? and again… what is the story with the textdomains?

    Do you understand my question or should I explain more?

  • aristath
    • Recruit

    You don’t!

    The language file name should be like this:

    membership-WP_LANG.mo

    the WP_LANG part is defined in your wp-config.php file.

    So if for example you want it in French, you should have fr_FR as your language in your wp-config.php and the file name of the membership translation should be membership-fr_FR.mo

    I hope that helps!

    Cheers,

    Ari.

  • consalta.admin
    • WPMU DEV Initiate

    Ok, and if there is no lang specified in the wp-config file then membership.mo??

    The first thing I tried was a straightforward translation of the po file, with a specified language in the wp-config…. as you instructed, and still I cannot seem to get a frontend result.

    Cheers for the input.

  • aristath
    • Recruit

    If there is no language specified then translations will not b used.

    If you want to use the translations, then you MUST specify something in WP_LANG in your wp-config.php file.

    WordPress uses .mo files to do th translations. However .mo files are not editable.

    This is why we use .pot and .po files.

    .po files can be edited using PoEdit, and then the .mo file can be generated.

    The .po files are user-editable and human-readable, while the .mo files are the ones that WP uses to display the proper language.

    Does that make sense?

    Cheers,

    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.