Jump to content
Sign in to follow this  
tom

Localization?

Recommended Posts

tom

I am a happy user of your iBlogPro3 theme. It's highly configurable but it looks like there is no easy method of localization. I need a blog running german language. It looks like it's prepared using the right php functions. As far as I understand it should implement a text-domain like this : I18n_for_WordPress_Developers so we can translate all the strings by just translating a text-file. Is there something in the works? Tom

Share this post


Link to post
Share on other sites
Andrew

That sounds good, there probably isn't too much work left to fully localize the theme. We'll look into it... but we might need some of your help to make sure its done correctly.

Share this post


Link to post
Share on other sites
max

Certainly it could be a leap forward. I can help with the spanish localization.

Share this post


Link to post
Share on other sites
rbojanssen

Offering my help for a Dutch translation!

Share this post


Link to post
Share on other sites
Tang

Hi, I amm a new German iBlogPro3 user and also looking forward for the german localization. I just downloaded the plugin: codestyling localization of german developer Heiko Rabe. But now I'm not shure if I better should wait for 3.5.1 with localization included? Anyway - I will take a look at it. Tang

Share this post


Link to post
Share on other sites
Tang

Hi, I'm back again Yes, I did it :) !!! Localization in German was finished in 2 Hours with the WP-plugin, I was talking about: ?»codestyling localization?« Now I have my German .po and .mo files, that give me the translations, I was looking for. I send them over to you, Andrew to check! This tool did a good job and I'm quite happy now. I hope everything works fine and smouthly and I continue working on my iBlogPro3-Website now. Tang

Share this post


Link to post
Share on other sites
Andrew

That's great. I'll refer people to the plugin. Thanks for your help.

Share this post


Link to post
Share on other sites
rbojanssen

@tang Hi there, indeed a great plugin. Did you manage to load the files to? I made the .po and .mo files with poedit and they look ok but so far I couldn't get them to work. Btw, I installed the plugin and I get this message: ATTENTION: The path of translation files is ambiguous, please select the language file folder! Not sure what to do next, I'm guessing it has something to do with the theme not providing some needed settings?

Share this post


Link to post
Share on other sites
Tang

Hi, rbojanssen: I had the same message at the beginning, but when I klicked on the top folder of the displayed list in ?»codestyle localisation?« the plugin started scanning the themefolder and gave me a brandnew .po file. This was my starting point for translation. And this goes to Andrew: I was running into different problems today. I wanted to update the translation by correctiong the german ?»Umlaute?« like ?¤?¶?? etc. that need something like ?»???« to be recognized correctly. This worked out perfect. But then I recognized, that I now have two .po/.mo files in iBlogPro3. The german .po/mo. and the default.po/.mo. I translated the default.po, but ther was no way in ?»codestyle localisation?« to built a .mo file for it. So I did that with Poedit. Poedit creates a .mo file simultaneously with the .po file. But still the default.po/.mo translations don't show up in the website. Im not a programmer at all and so I dont have the background. But I think, there has to be a simpler way to get, what we need. I don't know, what the default.po/.mo file is made for. Anyway - for the future we should have a separate language-folder for the .po/.mo files. I found a good idea for future translations at a japanese-theme-site. This guy also has a default.po file in a language-folder an gives following instructions for it. This is just a suggestion: WP-Theme-Translation Instruction: If your language is not listed HERE and you want to contribute a translation, follow these steps: 1. Download the latest version and install it to your blog. 2. Go to {template directory}/languages, you'll find a file named default.po that you have to rename to your WPLANG. (for example: zh_CN.po) 3. Open this file in poEdit (free software) and start your translation. 4. Upload .MO file to {template directory}/languages and test it on your blog. 5. Send both the .PO and .MO files to me via Email. 6. Done. (I'll add the new language to the next version.) One last thing. In the WP-Interface there should be a way to change the Date-Format to D/M/Y etc. Happily looking forward to see all this develop. Tang

Share this post


Link to post
Share on other sites
rbojanssen

@tang First of all, thanks for pointing me in the right direction. Clicking the folder did not work but it gave me the idea that it had something to do with the permissions and it did. I created the folder "language" and made it writable (chmod). I copied the default.po and default.mo files in there and ran the plugin again. Clicked 'add language" and selected the dutch language, so that worked. As for your remark for adding the .mo file, it is possible from within the plugin. Click the "edit" button for your language and in the screen that appears there should be a button called "generate mo-file". If it doesn't showup use a ftp program and set the writable permissions on the folder the language files are located. (When changing permissions do NOT use the root folder of the theme btw!!!!) Tang, read this addressed to Andrew too please, could prevent some headaches :P @Andrew The default files Tang is talking about, are those the same I have? Because if they are, those are the files you did as a test and therefore are NOT complete. Think you should include the iBlogPro.pot (or po / mo) file I made for you with poedit. As far as I can see, those files are complete. I did some more testing. Remember the translated files I sent to you? I uploaded them into the localization plugin and guess what, they work :) The 2 default files aren't in any way needed for the plugin btw. Adding a language and clicking the scan button does the job. So the only left to do, is reading them, and that is for you ;)

Share this post


Link to post
Share on other sites
Andrew

You guys are great help. A lot of info here.. I'll do my best and send the 3.5.1 update today and you can tell me what is still missing. Andrew

Share this post


Link to post
Share on other sites
rbojanssen

Got it, installed it and it WORKS !! Great job Andrew and big thanks!!!!

Share this post


Link to post
Share on other sites
Tang

Yes, thank you Andrew! Everything seems okay to me as well. But??¦ Scanning with ?»codestyle localisation?« still gives me 3 textdomains: twitter-for-wordpress (.mo generate button aktive), iblogPro (.mo generate button aktive) - this is where I generated the german translation files from. And finalliy a ?»default?« textdomain with some important words included like: Photos, Comments, On etc. All these words can be translated within the plugin, but there is no way to include them in the language.mo file. So I used the php-locate function of the plugin and edited the few words manualy in the editor as well as the Date-Structure d/m/y to be displayed under Posts. This cannot be the final solution, because with every update, I have to go back to php to fish for these few words. But for now I'm happy and send You my best wishes Tang

Share this post


Link to post
Share on other sites
Tang

Yes, I forgot something, of course the NL-language files should be named: nl_NL.mo and nl_NL.po to show up correctly under available languages in the localization plugin. good night from Germany Tang

Share this post


Link to post
Share on other sites
rbojanssen

Correct Tang, dutch language files should be renamed to work in this version, already mailed that to Andrew. But I would like to see that the naming convention for the language files would be the way I created the first one's. Looking at other themes and plugin translations they all put the Theme/Plugin name in front. That way you can always see to which Theme/Plugin the language file belongs. I think it is important to separate them because for 1 reason is that PageLines provides 3 themes and with the current naming the language files for all 3 would have the same name. (Try to keep those separated on your local hard drive :P) So for the iBlogPro theme they would be named: iBlogPro-nl_NL.mo and iBlogPro-de_DE.mo etc??¦ I think naming them that way follows the Wordpress naming convention a bit more! Also I noticed some not translated words and other minor issues, will write them down in an email.

Share this post


Link to post
Share on other sites
Andrew

Did the files with that format work with the plugin you guys are using? I do think I saw that naming convention recommended somewhere...

Share this post


Link to post
Share on other sites
rbojanssen

Hi Andrew, As stated in the mail, I had to rename the 2 files to nl_NL.po and nl_NL.mo. After that they worked with the plugin AND for the translation. Btw, the only thing the plugin does is provide an easy way to edit the language. So if someone wants to use poedit or so that works just fine. Just remember, you should always provide a non translated .pot file for the translators (I did send you one by mail a couple of days ago). As stated here: http://codex.wordpress.org/User:Skippy/Creating_POT_Files (and some other places) they recommend to name the file themename-nl_NL.mo for Dutch and themename-de_DE.mo for German, etc.. Personally I don't care what name they have, as long as they work :-D

Share this post


Link to post
Share on other sites
Jackey

Why is it that "On" in the blogs date header is not translated despite of the fact that it is translated in the language files. The same goes for "(required)" in the reply form after name. Regards, Jackey

Share this post


Link to post
Share on other sites
Andrew

Something may need to be changed/improved in the theme localization markup... We're looking at this for improvement in future updates

Share this post


Link to post
Share on other sites
Jackey

Line 25 in _posts.php needs to be changed in:

<div class="post-date"><?php _e('On', TDOMAIN)?> <?php the_time(get_option('date_format')); ?>, <?php _e('In', TDOMAIN);?> <?php the_category(', '); ?>, <?php _e('by', TDOMAIN);?> <?php the_author(); ?></div>[/code]

	
	and
	
	Line 62 in comments.php needs to be changed in:
	
[code]<label for="author"><small><?php _e('Name', TDOMAIN);?> <?php if ($req) _e('(required)', TDOMAIN); ?></small></label></p>
and Line 10 in _Pagecontent.php:
<?php edit_post_link('Edit', '<p>', '</p>'); ?>

"'Edit'" Is not provided in the iBlogPro.po. Regards, Jackey

Share this post


Link to post
Share on other sites
Andrew

Thanks Jackey, I appreciate you solving the problem and working with us to fix it. Will update the theme ...

Share this post


Link to post
Share on other sites
Jackey

Another addition: At the end of line 18 in template_feature.php:

	">More
	[/code]

"More" Is not provided in the iBlogPro.po. I suggest however to make it an optional text in the "Feature Link" on the feature pages.

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  

×