Recent Topics

[2.x] Language pack

Started by on May 13, 2009 – Contents updated: May 13, 2009

May 13, 2009 16:54    

My b2evolution Version: 2.x

I am trying to update the swedish language file from ver 1.10.x to ver 2.4.x. I have used POedit to do the translation ( following the instructions in "Updating Language Files") and have got a new messages.po and a file called messages.mo. Nothing seems to happen when transfer the .po file to b2evo. None of my translations are appearing. What to do with the .mo file? Do I need to do anything with the _global.php file? I am new to b2evo, as you probably can understand from the questions and would appreciate any help.

Mats

May 13, 2009 17:05

Hi Krave1,

I know nothing about language packs I'm afraid ( pretty sure you have to generate /locales/your_local/_global.php somehow ... buggered if I know how though.

I'll move this to the localisation forum for you ;)

¥

May 13, 2009 17:06

Hi krave1. Welcome to the forums ... and thanks for translating!

So here is the thing: PoEdit is only a step in the process that lets you make the translation conveniently. Unfortunately, b2evolution requires the global.php file in the appropriate path in order to translate. To the best of my knowledge there is no easy way to do that. Actually I think if you're super-geeky and all over Linux and command line stuff then it is probably 'easy', but that is a tiny minority out there eh?

Or, wait a minute. Perhaps http://manual.b2evolution.net/Localization helps? Last time I even thought about translations it was a nightmare to figure out how to make a global.php file but perhaps things are easier now?

Oh and let's hope some of the folk who are good at dealing with creating localizations come along :)

May 17, 2009 16:21

krave1 wrote:

My b2evolution Version: 2.x

[...] None of my translations are appearing. What to do with the .mo file? Do I need to do anything with the _global.php file? I am new to b2evo, as you probably can understand from the questions and would appreciate any help.

Mats

Suggestion ;) :

In your [your blog directory]/locales make a new directory of the name sv_SE, for instance:

mkdir [your blog directory]/locales/sv_SE

Proceed to make another directory named LC_MESSAGES as below

mkdir [your blog directory]/locales/sv_SE/LC_MESSAGES

Place your updated file messages.po into the above directory, hence you should have:

[your blog directory]/locales/sv_SE/LC_MESSAGES/messages.po

Make a backup first and subsequently edit the file:

[your blog directory]/conf/_locales.php

to adjust for your language preferences. In particular make sure that you will be able to extract your language strings by modifying the line almost at the end of the file _locales.php by replacing the default value, from 0 to 1, as below:

$allow_po_extraction = 1;

Save changes to your edited file. You should restart your web server[1].

Now when you log into your b2evolution backend, and select Global settings followed by Regional, "you will see a link named [extract]" next to your language or locale icon (in particular). You should click the extract links to extract your language or locale strings. Accordingly, this action will create the file _globals.php in your locale directory or folder. Hence, this created file location would be as below:

[your blog directory]/locales/sv_SE/_globals.php

Once you successfully completed your task, proceed to edit [your blog directory]/conf/_locales.php file once again and set to 0 (zero) the value (referenced above) almost at the bottom of the file:

$allow_po_extraction = 0;

Save your changes to the file.

Good luck!

[1] If you are using Apache web server you may want to restart it as:

Apache2ctl -k restart

In the above command, I am assuming that you have an relatively recent version of GNU/Linux --specifically Debian.

May 17, 2009 17:52

Thanks to nanahuatl for the very descriptive instructions, everything is right, but you [u]don't need[/u] to restart the server.

May 18, 2009 04:58

sam2kb wrote:

Thanks to nanahuatl for the very descriptive instructions, everything is right, but you [u]don't need[/u] to restart the server.

Your kind words are appreciated, sam2kb. I am myself engaged in updating the translation into Spanish --specifically, the variation spoken by the Mexica people ( es_MX ) living in the Fifth Sun era.

The last translation was done against b2evo 0.9.2, hence some 1000 entries were deprecated in the current b2evo version. Additionally, some 2000 new strings are in need of being translated into that locale.

Best regards.

May 18, 2009 16:29

Thank you nanahuatl for the informative post and the translation you are working on!

May 19, 2009 10:48

EdB wrote:

Thank you nanahuatl for the informative post and the translation you are working on!

Your vote of confidence is appreciated, EdB. Some time ago, I learned that an certain major television enterprise south of the border had deployed WP in some of their channels. And I wondered, why not b2evo? Until I saw the outdated es_MX language module. Sure, they could have used the es_SP module, I guess; however that blog software they selected has been around for a while and is more well known.

I am only interested in making available the b2evolution experience to an wider audience.

Best regards.


Form is loading...

Free CMS – This forum is powered by b2evolution CMS, a complete engine for your website.