localization - Combining keys and full text when working with gettext and .po files -
i looking @ gettext , .po files creating multilingual application. understanding in .po file msgid source , msgstr translation. accordingly see 2 ways of defining msgid:
using full text (e.g. "my name %s.\n") following advantages:
- when calling
gettextcan see translated - it's easier translate
.pofiles because contain actual content translated
using key (e.g. my-name %s) following advantages:
- when source text long (e.g. paragraph company),
gettextcalls more concise makes views cleaner - easier maintain several
.pofiles , views, because key less change (e.g. key ofcompany-descriptionfar less change actual company description)
hence question:
is there way of working gettext , .po files allows combining advantages of both methods, is:
-usage of keys gettext calls
-ability translator see full text needs translated?
i answered similar (much older) question here.
short version:
the po file format simple, possible generate po/mo files workflow allows flexibility you're asking for. (your devs want identifiers, translators want words)
you roll solution yourself, or use cloud-based app loco manage translations , export gettext file identifiers when devs need them.
Comments
Post a Comment