From: Jesse P. <je...@st...> - 2004-09-05 04:19:18
|
>> That would be a great help re internationalization. One question on this... I saw that you asked that this be done: >> echo "<P>A long string full of $NumberOfCharacters characters"; >> would need to be re-written as: >> echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . ' >> ' . _('characters'); It makes perfect senses and is easy to follow. I also do not know gettext much at all. The root of what I am wondering is if php evaluates a variable in a "num = $TheNum" style string before gettext translates it or not. If not, it would probably make things a lot easier on potential translators to work with: _("A long string full of $NumberOfCharacters characters"); instead of: _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . _('characters'); Luckily our code keeper is committed to readable code, so the variable name should generally describe what it is. That would give a translator 2 things - more full context to what they are translating and one less translation to do. I also know languages just enough to know that piecing together english translations in the manner underway does not necessarily produce coherent output. The more a message can be presented with context, the better the translation will be. Just a thought - not sure how feasible it is... jesse |