From Fedora Project Wiki

(Add page with tips for translators)
 
Line 6: Line 6:


For example in German, This won't work:
For example in German, This won't work:
msgid: "String `%s' has %d characters\n"
 
msgstr: "%d Zeichen lang ist die Zeichenkette `%s'"  
<code>msgid "String `%s' has %d characters\n"<br>
msgstr "%d Zeichen lang ist die Zeichenkette `%s'"</code>


so that the number with $ mark can be given as below:
so that the number with $ mark can be given as below:
msgstr: "%2$d Zeichen lang ist die Zeichenkette `%1$s'"
 
<code>msgstr "%2$d Zeichen lang ist die Zeichenkette `%1$s'"</code>


[[Category:Localization]]
[[Category:Localization]]

Revision as of 21:09, 22 November 2009

The Fedora Localization Project - Tips for Translators

Controlling parameters order

When translating, sometime the result of particular translated string contains different parameters order. But it usually is not allowed. There is the workaround to change the order in translation, and it can be found at 'info gettext'.

For example in German, This won't work:

msgid "String %s' has %d characters\n"
msgstr "%d Zeichen lang ist die Zeichenkette
%s'"

so that the number with $ mark can be given as below:

msgstr "%2$d Zeichen lang ist die Zeichenkette `%1$s'"