Full translation of plugins/themes, detailed discussion please

Hi,

I have asked this question somewhere (here) but it would be more useful to ask you all my questions related to translation of plugins/forum.

Question N

1) If I translate plugins' language files and upload them in languages folder, how will it act? For example there are two languages in my network - English and Georgian. If user uses English language, plugins will be in English and if (s)he is using Georgian language, plugins will be in Georgian, YES or NO?

* Same question to themes.

2) How to name newly-created plugin language file? Just add at last - ka_GE.po/mo? For example my WordPress Georgian language file is named like this:

`ka_GE.po
ka_GE.mo`

Can you give me some examples from your plugins how to name them?

For example, Affiliates has language file named "affiliate-en_US" so I have to name new file "affiliate-ka_GE", but there some plugins, for example BuddyPress Activity Plus, which have this kind of language files - "bpfb-default", how to name newly-created files for plugins like these? AND there are plugins, for example Rebranded Meta Widget, which has languages folder but doesn't have file there to edit. Also there are some plugins, which just don't have languages folder, for example "Site Wide Text Change" plugin, it has it's language file directly, not in "languages" folder. Forums plugin just doesn't have language files.

So I think I have discussed all kinds of issues. Support is yours :slight_smile:

Thank you!

  • DavidM

    Hi kshengelia,

    1) If I translate plugins' language files and upload them in languages folder, how will it act? For example there are two languages in my network - English and Georgian. If user uses English language, plugins will be in English and if (s)he is using Georgian language, plugins will be in Georgian, YES or NO?

    Actually, no, it all depends completely on the language you set in wp-config.php, which I imagine in your case would be:
    define('WPLANG', 'ka_GE');

    2) How to name newly-created plugin language file? Just add at last - ka_GE.po/mo? For example my WordPress Georgian language file is named like this:
    ka_GE.po
    ka_GE.mo

    In general you can simply replace the language suffixes at the end of the existing language files, as you've seen in many of the plugins.

    Can you give me some examples from your plugins how to name them?

    Sure, Supporter for instance would be supporter-ka_GE.po and supporter-ka_GE.mo. It's discussed further in the following thread if that helps as well.
    https://premium.wpmudev.org/forums/topic/how-to-translate-supporter-plugin

    For example, Affiliates has language file named "affiliate-en_US" so I have to name new file "affiliate-ka_GE", but there some plugins, for example BuddyPress Activity Plus, which have this kind of language files - "bpfb-default", how to name newly-created files for plugins like these? AND there are plugins, for example Rebranded Meta Widget, which has languages folder but doesn't have file there to edit. Also there are some plugins, which just don't have languages folder, for example "Site Wide Text Change" plugin, it has it's language file directly, not in "languages" folder. Forums plugin just doesn't have language files.

    bpfb-default.po should become bpfb-default-ka_GE.po.

    Rebranded Meta Widget actually would require creation of the language file, rmw-ka_GE.mo as mentioned on line 46 of the plugin file rebranded-meta-widget.php.

    Site Wide Text Change has an included .pot file which is the same as a .po file and you can simply rename it as site-wide-text-change-ka_GE.po.

    We'll take a look at getting things clarified in the installation page, but for now if you have any specific questions on any plugin or theme, just let us know and we'll clarify that.

    Hope that helps!

    -David

  • Qlof

    Hello.

    Wordpress is loading the language from the .mo file. The .po file is for you to use when you change language strings, do the original translation etc.

    For the sitewide text change plugin, the filename should be sitewidetext-ka_GE.mo and it should be placed in the mu-plugins folder.

    For other plugins, you can check the plugin file. Look for the load_textdomain function. For example, in the site wide text change plugin you can see this: load_textdomain( 'sitewidetext', $mofile );

    It means the sitewidetext filename should be used before the language specific info (ka_GE). The code is sometimes difficult to read but if you are looking for which filename to use, the answer is often there.

    Other than that, I can recommend checking the name of the .pot file (if there is one). For most plugins, it's filename-default.po which would mean your language file should be named filename-ka_GE.po and mo. But that's not always accurate either.

    Alot of plugin authors has english as their native language and are not so aware of the language settings. Fortunately wpmudev have now internationalized all of their plugins.

  • kshengelia

    Hello Qlof,

    Wordpress is loading the language from the .mo file. The .po file is for you to use when you change language strings, do the original translation etc.

    So I don't have to upload .po file.

    For the sitewide text change plugin, the filename should be sitewidetext-ka_GE.mo and it should be placed in the mu-plugins folder.

    You are partly true, I have named file as you suggested and it's correct, but when I uploaded it in mu-plugins, it didn't work, and now I have uploaded to original path (/site-wide-text-change/sitewidetextincludes/) where default language file was located and it works.

    Qlof, thank you again very much! Very useful info for me..

    Thank you too, David

    I'll inform you guys if I discover some specific issue, thanks both.

  • Qlof

    Glad I could help. My sitewide text change is located in the mu-plugins folder but maybe I have an older version. I'm glad you found the right dir.

    You don't have to upload the po file. The mo file is the only file needed on your server. But I would recommend saving the po file if you want to do some changes and generate a new mo file in the future.

    The language files will be removed when you update the plugin if you use the automatic update in the admin area. The same thing goes for all plugins and themes. Basically, it deletes the folder and re-uploads. So you need to download the language file before update and upload them again after you have updated. That's another good reason to always save the po/mo files on your computer as well :slight_smile:.

  • kshengelia

    * Note - this thread may be documentation for many users who are translating your products. So it's not useful only for me. Thank you!

    OK, complete list for my translating issues

    ---

    Plugins which just don't have language files

    * forums
    * default-theme
    * content-monitor
    * contact-widget
    * comment indexer (I think it doesn't need any language file, as it doesn't have interface)
    * post indexer (I think it also doesn't need any language file)
    * protect-selected-content
    * rebranded-meta-widget
    * recent-global-author-comments-feed
    * recent-global-author-posts-feed
    * remove-permalinks-menu-item (I think it also doesn't need)
    * remove-wp-dashboard-widgets
    * tag-feed

    #! there may be general way to act with plugins like this, but I believe same way won't work with all of them.

    Plugins which have language files, but don't know how to name them, as each many of them require different naming

    * post-voting plugin
    * ad-sharing
    * autoblog
    * automessage
    * blog-user-creator
    * custompress
    * e-newsletter
    * global-site-tags
    * incsub-support (resolved, I have just added -ka_GE.mo)
    * moderation
    * recent-custom-post-type
    * wpmu_dev_maps_plugin
    * wpmu-dev-facebook
    * admin-footer-text
    * admin-help-content
    * affiliate (resolved, just added -ka_GE.mo)
    * blog-types
    * global-footer-conent
    * google-analytics-async
    * invite
    * lock-posts
    * login-image
    * mass-mailer
    * reports
    * signup-code
    * site-wide-text-change
    * tips
    * wordpress-chat (I have created 100% done language file and uploaded, it works, but on Plugins' page, Plugin description is in English. This is not very important, but it's bug?)
    * wpmu-dev-plusone

  • Qlof

    I use alot of these plugins and I have managed to translate them all, with few exceptions. I'll go through your list later and list the ones I'm using with detailed info on where to place the language files, and any issues I have with the translation of the plugin.

    For post indexer and comment indexer you don't need language files, just like you suspected.

    As for plugin descriptions, they are always in english. It seems that it's impossible to translate them. I usually edit the plugin file to change the description. That would have to be done after each update. For special characters, such as åäö, you need to use the html code for that character. Here is a good list of html codes for different characters: http://www.tiger.se/dok/koder.html

    It would be great if wordpress made it so that the plugin name and description were translatable. It sucks to have to edit the plugin file after every update. The same goes for themes but I just leave those in english for now.

  • kshengelia

    I use alot of these plugins and I have managed to translate them all, with few exceptions. I'll go through your list later and list the ones I'm using with detailed info on where to place the language files, and any issues I have with the translation of the plugin.

    Wow, I am waiting for you than. Thank you very much!

    As for plugin descriptions, they are always in english. It seems that it's impossible to translate them. I usually edit the plugin file to change the description. That would have to be done after each update. For special characters, such as åäö, you need to use the html code for that character. Here is a good list of html codes for different characters: http://www.tiger.se/dok/koder.html

    It would be great if wordpress made it so that the plugin name and description were translatable. It sucks to have to edit the plugin file after every update. The same goes for themes but I just leave those in english for now.

    Anyway, the most part of WPMU DEV plugins have capability to translate Plugin name,.description, even author and plugin link. But in CHAT case, it doesn't work.

    For example I have 100% translated SiteWideTextChange plugin and description is translated too.

  • Qlof

    Ok so here's my rundown. For filenames I'm just gonna keep sv_SE because that's what I'm using, but ofcourse you should change it to your own language domain.

    Also, I will use "plugindir" for a plugins dir. I.e. the forums plugindir = wp-content/plugins/forums/ but it's easier to not write it out for every plugin.

    * forums
    File dir: plugindir/languages/wpmudev_forums-sv_SE.mo
    This dir was added into the newest version of the plugin.

    * rebranded-meta-widget
    plugindir/languages/rmw-sv_SE.mo

    * recent-global-author-comments-feed

    * remove-wp-dashboard-widgets
    Doesn't need a language file

    * post-voting plugin
    I have used this: plugindir/languages/wpmu-dev-post-votes-sv_SE.po
    But I'm not sure if it works. It might be plugindir/languages/wdpv-sv_SE.po please let me know if you test it.

    * ad-sharing
    plugindir/ad-sharing-files/languages/ad_sharing-sv_SE.mo

    * global-site-tags

    * wpmu-dev-facebook
    plugindir/languages/wdfb-sv_SE.mo (doesn't translate the menu items)

    * admin-footer-text
    plugindir/languages/admin_footer_text-sv_SE.mo

    * admin-help-content
    plugindir/admin-help-content-files/admin_help_content-sv_SE.mo

    * google-analytics-async
    plugindir/languages/google-analytics-async-sv_SE.mo

    * login-image
    plugindir/login-image-files/languages/login_image-sv_SE.mo

    * mass-mailer
    I just removed this plugin the other day and installed the e-newsletter plugin.

    * site-wide-text-change
    mu-plugins/sitewidetext-sv_SE.mo

    Generally: Look for the .pot file. The .mo and .po files have the same name and location 90% of the times. But instead of i.e. pluginname-default.pot you change it to pluginname-sv_SE.mo etc.

  • kshengelia

    Hi Qlof,

    Firstly thank you so much.

    * post-voting plugin
    I have used this: plugindir/languages/wpmu-dev-post-votes-sv_SE.po
    But I'm not sure if it works. It might be plugindir/languages/wdpv-sv_SE.po please let me know if you test it.

    None of them works for me, unfortunately :slight_frown:

    * wpmu-dev-facebook
    plugindir/languages/wdfb-sv_SE.mo (doesn't translate the menu items)

    It worked. Anyway, we can use Text Change plugin to edit those menu items. Hope they will be translatable in following update.

    * admin-footer-text
    plugindir/languages/admin_footer_text-sv_SE.mo

    No

    * admin-help-content
    plugindir/admin-help-content-files/admin_help_content-sv_SE.mo

    Worked.

    * google-analytics-async
    plugindir/languages/google-analytics-async-sv_SE.mo

    Not.

    * login-image
    plugindir/login-image-files/languages/login_image-sv_SE.mo

    Worked, but this text wasn't translated "Image will be cropped to 310px wide and 70px tall. For best results use an image of this size. Allowed Formats: jpeg, gif, and png"

    Maybe it's bug. Is it translatable for you?

    * mass-mailer
    I just removed this plugin the other day and installed the e-newsletter plugin.

    Yes, e-Newsletter is more functional but if you'd like to quickly inform users with 1-2 sentences, mass mailer is better for me in this case.

    Anyway, mass-mailer_ka-GE.mo doesn't work, so, how do you translate your e-Newsletter plugin?

    * site-wide-text-change
    mu-plugins/sitewidetext-sv_SE.mo

    It worked, but for me it is: plugins/sitewidetext-ka_GE.mo , maybe newer version.

    ---

    Thank you very much! I'll retry uploading/renaming those files which I failed.

  • kshengelia

    My Membership on this site expires in few hours, so if you need to ask me some questions in order to help me (for example "Have you tried that?"; "Where have you located that file?" and etc.), send me an E-mail please - kote.shengelia@gmail.com

    Ok, I am listing all my translation issues in details - what I have tried, what didn't work and et

    Firstly, I have to say, that I have correctly edited wp-config.php to ka_GE language and interface is translated and most plugins too.

    * Easy Google +1 - Tried "plusone-ka_GE.mo" - Doesn't work!
    * e-Newsletter - Tried "email-newsletter-ka_GE.mo" - Doesn't work!
    * Post Voting Plugin - Tried "wpmu-dev-post-votes-default-ka_GE.po" and "wpmu-dev-post-votes-ka_GE.po" - Doesnt' work!
    * Ultimate Facebook - Tried "wpmu-dev-facebook-default-ka_GE.mo" and "wpmu-dev-facebook-ka_GE.mo" - Doesn't work!
    * WPMU DEV Maps / Google Maps - Tried "agm_google_maps-ka_GE.mo" - Doesn't work!
    * CustomPress - Tried "custompress-ka_GE.mo" - Doesn't work!

    And some other plugins, which I have listed in my post above. Qlof has helped me with most of them and I'd like to thank him again for that, but not all of them, so I am asking developers for help.

    Thank you everyone very much!

    Kote

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.