Recent Topics

1 Feb 23, 2006 18:36    

Hi all

I need to be able to add new text labels (in english in the source code) and then add their corresponding translations to the various language files - at least in the german one - so that they are supported automatically.

I've downloaded poEdit and looked at the docs page about localization but am not sure how to go about this - it's not a new localization but an addition of new text to the source which then needs to be reflected in the translation files.

Can anybody give me a simple overview of how to do this?

Much appreciated!

Regards
Robert

3 Feb 24, 2006 07:38

Thanks - had a look and also dived into the german .po file. Now I have a question, just for clarification:

If I use poEdit to add a new text label and at the same time add it's translation to the germna .po file, how do I see this reflected at runtime?

I don't quite follow if the process is the same for this as for adding completely new .po files...

TIA
Robert

4 Feb 24, 2006 20:30

Sorry, as I said "I don't do translations" so I really can't help you, there are a fair few posts regarding po files in that forum though, maybe one of those has the answer?

¥

5 Feb 24, 2006 22:37

AFAIK you're on the right track. Your label exists in English inside the T_() thing right? And the po file tells it "this label translates to this text"? AFAIK that's all you need, but I'm unilingual so I can't say for sure.

Testing shouldn't be too hard. Does your computer display your blog with the German translations in general? If so upload your changes (the file with the new label and the new po file) and see if you get the label in English or German.

Hmmm.... Even if you blog in English you can test it by tweaking the new label to appear in the post loop. Literally just stick <php echo T_('newlabel') somewhere in your post loop, then make a post and select German as the language. I had a blogger do that once. An American who took pride in his German roots and wanted the German flag by his post. The whole blog was in English except his post. Anyway that tells me you can test if the po file is translating for you.

6 Feb 25, 2006 10:58

Hi EdB

Well, not quite ... that's what I was hoping. After adding the new text and it's translation to the german .po file, uploading and checking, the text on the page is still shown in english (yes, coded as

echo T_('text')

) .

It seems I have to compile a new globals file - need to look into the instructions again (RT#M !) and see how to do this?

Or should I be putting my new text in a pot file and then using poEdit to merge this into the .po file?

Which is right?

TIA
Robert


Form is loading...