Jump to content
Sign in to follow this  
kruinigere

Translation problems

Recommended Posts

kruinigere

I use the Dutch WordPress 3.0.1 and Platform Pro. It works great, but I wasn't able to translate some phrases into Dutch. On a blog page I now read: 'Currently viewing the category:", every item has the text 'by admin', the search box says 'Search' etc.etc. I've searched this forum and I already tried some suggestions: I've used POedit to translate the platform.po and .mo files, renamed them to nl_NL.po and .mo - but it doesn't work. What do I do wrong...? I'm relatively new here, so is there a tutorial or something? Thnx for helping me out!

Share this post


Link to post
Share on other sites
cmunns

Did you change the wp-config file to pick up the translation?

Share this post


Link to post
Share on other sites
kruinigere

Thnx for your answer! The wp-config file says: define ('WPLANG', 'nl'); The comment in the wp-config file states "A corresponding MO file for the chosen language must be installed to wp-content/languages." In wp-content/languages I find the original Wordpress po-/mo-file and they work fine. P.e., my Wordpress-dashboard is in Dutch. But the problem is (as far as I can see) with the files in wp-content/themes/platformpro/language. I used POedit to adapt platform.po and platform.mo, but without any result. I've tried to change the names in nl.po/mo and nl_NL.po/mo - but still no result. Should I have changed something in another php-file or...?

Share this post


Link to post
Share on other sites
cmunns

try renaming the folder from language to languages. Also, I'm not sure if you are supposed to replace the original .po/.mo files as much as you should just create a new one.

Share this post


Link to post
Share on other sites
kruinigere

Thnx again! I've changed the folder name to languages - but no result. I've copied the translated po/mo-files a few times and I now have (in the platformpro/languages folder) the files nl.po/mo, nl_NL.po/mo and platform.po/mo - all with the same content. Afterwards I deleted the translated platform.po/mo files and restored the original ones. All with no result. (See the image, just to give an example of the texts I would like to see translated: VpOP1.jpg) It would be great if someone would make a small tutorial... Thnx!

Share this post


Link to post
Share on other sites
bryan-hadaway

Forwarding to developers. Thanks, Bryan

Share this post


Link to post
Share on other sites
cmunns

Here is the first line of code in the theme, I want to show you so you can see that it is localized and ready for translation `<?php _e("Currently viewing the category: ", 'pagelines');?>` How are you generating the .po/.mo files in PoEdit?

Share this post


Link to post
Share on other sites
kruinigere

Hi there. Thnx again for your answer. I think the problem is that I've never translated PO-files before. Probably I simply forget something or I do something completely wrong (but I couldn't find any help-file or tutorial...) Let's explain what I did: I open the existing platform.po-file with POedit, add some translations and then save it using the button 'Save catalog' (the setting is on 'Automatically compile MO-file on save'). Then I use FileZilla to overwrite the old platform.po-file with the new one. In the translated po-file the header is now like this:

msgid "" msgstr "" "Project-Id-Version: Platformn" "Report-Msgid-Bugs-To: n" "POT-Creation-Date: 2010-09-16 12:12-0800n" "PO-Revision-Date: 2010-11-17 10:07+0100n" "Last-Translator: Edwin <[email protected]>n" "Language-Team: PageLines <[email protected]>n" "MIME-Version: 1.0n" "Content-Type: text/plain; charset=UTF-8n" "Content-Transfer-Encoding: 8bitn" "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_nn" "X-Poedit-Basepath: .n" "X-Poedit-Language: Englishn" "X-Poedit-Country: UNITED STATESn" "X-Poedit-SearchPath-0: .n"
The lines beneath are like this example:
#: template.postloop.php:33 msgid "Currently viewing the category: " msgstr "U bent nu in de categorie:"
Can you tell me what I do wrong or send me a link with a tutorial or something...? Thnx!

Share this post


Link to post
Share on other sites
nett-ed

I've used this tutorial in the past http://www.solostream.com/blog/wordpress/translate-wordpress-theme/ The load_theme_textdomain portion of step 3 is already taken care of for you so you don't need to do that. It's rather straight forward and it seems like you've done the proper steps for the most part. I would start from scratch and just follow the tutorial. One thing I did notice is that you're defining your WPLANG as nl in your config according to your previous post

define ('WPLANG', 'nl');

... so your resulting theme translation .mo file should be nl.mo

Share this post


Link to post
Share on other sites
kruinigere

Hi all there, thnx for the help, cause it's working right now. Just for the record (and to help others), here's what went wrong: using a suggestion that was made here, I had renamed the folder platformpro/language/ into platformpro/languages/. That didn't change anything, but I forgot to rename it into /language/ again (my fault). After renaming it again, AND changing the name of the po/mo-file in nl.mo and nl.po (thnx Garcia) it worked. So to help other newbees, here are the steps to translate the Platformpro-theme into Dutch (similar for other languages, just be sure to use the right name in step 6): 1) Download and install the Dutch version of Wordpress. If you do so, the settings in the wp-config.php file (in the httpdocs-map) are:

define ('WPLANG', 'nl');
2) Download and install the Platformpro-theme. 3) Download the files platform.po and platform.mo in the map /httpdocs/wp-content/themes/platformpro/language to your desktop. 4) Open the po-file with the free program POedit. 5) Make all the translations you need and save the changes (using the button Save catalog). Make sure that the option 'Automatically compile .mo file on save' is chosen (see File/Preferences tab Editor). 6) Rename the po/mo-file into nl.po and nl.mo. Do not use Nl_nl.po/mo, like is suggested on some sites... (You should use the same name as is used in the wp-config.php file.) 7) Upload the files to the map /httpdocs/wp-content/themes/platformpro/language. That's all. Looks so easy now :-)

Share this post


Link to post
Share on other sites
diretornak

@cmunns Where did you find this?

Here is the first line of code in the theme, I want to show you so you can see that it is localized and ready for translation <?php _e("Currently viewing the category: ", 'pagelines');?> How are you generating the .po/.mo files in PoEdit?

Share this post


Link to post
Share on other sites
cthmsn

Do you mean where is the line

<?php _e("Currently viewing the category: ", 'pagelines');?>

I have it on line 226 of library.templates.php

Share this post


Link to post
Share on other sites
diretornak

Thanks a lot! =D

Share this post


Link to post
Share on other sites
heroescourse

This was super helpful. Thanks! Stephen

Share this post


Link to post
Share on other sites
remcobronsomanythoughtsnl

I just want tot make an addition to the comment of Edwin. He refers to renaming the .mo and .po files to nl.mo and nl.po to achieve the Dutch translation. This was true up until Wordpress version 3.0.2. For some reason the Dutch version used nl.mo files instead of the standard nl_NL.mo files like other languages do. Since version 3.0.3 this has been corrected. So! In Edwins steps you should now do: 6) Rename the po/mo-file into nl_NL.po and nl_NL.mo. (You should use the same name as is used in the wp-config.php file.) or... Check the folder /wp-content/languages and use the same file names as you see there in the PlatformPro Theme.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×