There are different ways to do this. The easiest way is to encode the application in the main language and simply wrap all translatable strings in __() . Later, you can add .po files for each translation you may need.
The problem with this approach is that if you want to change the text in the original language, you will also need to change the msgid entry for this line in every .po file that you may have. This can become rather cumbersome if you need to support different languages.
Please ignore the above information. A properly configured i18n workflow will use xgettext or similar utilities to automatically extract __() wrapped lines from source code and create, update, and merge .po files. Nothing cumbersome about this.
An alternative is to use the βdescriptorβ text in the source files and to place the actual text in the .po files, even for the main language. I.e:
__('PRODUCT CAPTION'); /eng/.po msgid "PRODUCT CAPTION" msgstr "Buy our awesome products!" /ger/.po msgid "PRODUCT CAPTION" msgstr "Kaufen Sie unsere Produkte!"
What works best depends on the project and on you, you have to figure it out ...
source share