. '''NOTA BENE - WORK IN PROGRESS''' - [[#Inputs_&_Thoughts|Your Inputs & Thoughts]] :-) ---- '''Back to''' '''[[Software|Software Homepage]]''' - '''To ''' '''[[Software/Assessment|Software Assessment Homepage]]''' ### Add your additional links here ---- = Technical issues of translation = This page should give overview and details on how the translation of the user interface texts are implemented. It has the focus on developing the main CAcert web page, but may apply to other projects as well. The CAcert Training System (CATS) translation is currently handeld differently, see the [[Brain/Study/EducationTraining/CATSTranslation|CATS Translation Page]]. ''This is a re-engineering work-in-progress. The information on this page is incomplete and may even be wrong! Please help in improving it!'' <> == Overview == If you are writing PHP code as a software developer and have a text that should be presented to the user in her selected language you just enclose the text in {{{ _( }}} and {{{ ) }}} like in {{{

}}} The text in the parentheses is used as "ID" for the text to be shown. If no better translation can be found then the text itself is shown, so it should always be in english. There is a tool which parses the code for this kind of strings, extract them and transfer them to the translation server, for translation by users. Another tool fetches the hopefully finished translation from the translation server and creates a messages.po file for each language in its own subdirectory of the www/locale directory. == For Software Developers == The most important thing has already been stated in the Overview paragraph: enclose translateable texts in {{{ _( }}} and {{{ ) }}}. ''ToDo: Which feature, library or code file does the translation? Obviously _("text") is a function call which returns the translated text...'' === Switching to another language === ''ToDo'' === Do's and Dont's === * Try to re-use existing texts, to reduce work for the translators. But it's still important to use different texts for different things, so don't overdo text recycling! * Don't include functionally relevant things in the translatable text, like hyperlinks or HTML tags in general. The example {{{ ','')?> }}} should give you the idea. ''ToDo: Are IDs case sensitive? Are white spaces relevant in IDs?'' == For Administrators / Software Assessors == === Extract new translateable texts from the code === ''ToDo'' === Install updated translation from the server === To manually install an updated translation on a server, call {{{ make }}} in the www/locale directory. ''On the testservers this seems to be done automatically once every day. ToDo: Which script/service is doing this? Is this the same for the production server?'' == Inputs & Thoughts == . YYYYMMDD-[[YourName]] . {{{ Text / Your Statements, thoughts and e-mail snippets, Please }}} == Related Links == . [[Brain/Study/Translations]] handles the topic of translating the texts themselves. . [[Brain/Study/EducationTraining/CATSTranslation|CATS Translation Page]] explains how translation is handled for the CATS. ---- ### Maybe add additional categories here . CategorySoftware