1Internationalization notes 2-------------------------- 3- apps: 4 - use setlocale to parse locale env vars and set to language code 5 - use textdomain to set the text domain of their app 6 - use bindtextdomain to tie the domain to a locale dir 7 - use gettext (possibly disguised as _) to translate in the current domain 8 9- libraries: 10 - should only use bindtextdomain to tie a domain to a locale dir 11 - use dgettext (possibly disguised as _) to translate from a set domain 12 13- How to make your plug-in code translatable: 14 - include <gst/gst-i18n-plugin.h> in all files that mark strings for 15 translation, or do the bindtextdomain call 16 - in plugin_init, add a block like this: 17 18#ifdef ENABLE_NLS 19 GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, 20 LOCALEDIR); 21 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); 22#endif /* ENABLE_NLS */ 23 24 - mark all strings you want translated for translation by wrapping them in 25 _() 26 - typically, these are all strings that serve as the message string for a 27 GST_ELEMENT_ERROR or _WARNING 28 - but it could also consist of any strings that may end up being presented 29 to the user (for example mixer track) 30 31Things to watch out for 32----------------------- 33- forgetting to bindtextdomain is an error that is not always noticeable, 34 because: 35 - any plugin from the same module being init'd binds the text domain, 36 so you may forget it in B, and still have it work because A bound the 37 domain 38 - without a bindtextdomain call, any domain is bound to the system locale 39 dir - so you could still have translations if it happens to be where the 40 translations are 41 42- our translations are managed by the Translation Project 43 http://www.iro.umontreal.ca/translation/ 44 They are updated by the release manager for prereleases using 45 make download-po 46 As the translator project website clearly states, only accept translations 47 from the translation project, and direct would-be translators there: 48 "It would defeat the purpose of the teams if you were directly accepting PO 49 files from individual translators, or were having "contracts" with them. If 50 people write to you, wanting to volunteer as translators, direct them to 51 translation@iro.umontreal.ca, and the translation coordinator will send them 52 appropriate documentation." 53