we are now using custom translations for our project in PHP and I want to migrate them to Symfony ones. Everything looks great, but my only concern is that variable placeholders needs key to bind successfully, can I somehow change the code to accept translation variables in sequence (without keys)? Let me show an example: Our code now: But this
Tag: translation
Implementation of multilanguage in PHP
I was wondering how to implement multiple languages in PHP script. I couldn’t really find any handy way of how such thing should be done to make it easy for translator. I’ll give an example: //Output …
Gettext or database translation
Which is better: gettext custom MySQL+cache based functionality Gettext is a sort of builtin feature, so I assume it’s tweaked for performance. Using poedit is a pain and impossible to show to any client. A custom functionality allows for simple translation interface. But might be heavy on php/db usage. I suppose, which one would you use when? Answer Localization is
How to specify ordered variables in gettext .po files?
I have a multi-lingual site that uses Zend_Translate PHP arrays to handle the translations. It works fine, but I’m trying to convert to using gettext since that offers extra features. However, I haven’t yet discovered the gettext equivalent of a feature that I liked in PHP array translations: n$ position specifier (example #4 of PHP sprintf). I found a good