Open main menu

Difference between revisions of "Supporting GUI Translation"

Fix syntax highlighting
(→‎Mark translatable strings in the source code: Use a bit more technical terminology to explain the various translation related macros.)
(Fix syntax highlighting)
Line 11: Line 11:
If you want to give some additional explanations to the translators, or your string could be understood in a different ways, it is recommended to precede it with a comment tagged I18N.
If you want to give some additional explanations to the translators, or your string could be understood in a different ways, it is recommended to precede it with a comment tagged I18N.


<syntax type="C++">
<source lang="cpp">
// I18N: This is explanation to the line below and will be included in .pot and .po files
// I18N: This is explanation to the line below and will be included in .pot and .po files
static const char *foo = _s("Some translatable text");
static const char *foo = _s("Some translatable text");
Line 22: Line 22:
// I18N: Some more explanations for the translators
// I18N: Some more explanations for the translators
StaticTextWidget *soundfont = new StaticTextWidget(this, "name", _("None", "soundfont"));
StaticTextWidget *soundfont = new StaticTextWidget(this, "name", _("None", "soundfont"));
</syntax>
</source>


In the above example foo can be translated differently depending if it is attached to the context "lowres" or not.
In the above example foo can be translated differently depending if it is attached to the context "lowres" or not.
TrustedUser
2,147

edits