From: Phil D. <we...@pa...> - 2004-09-05 04:47:02
|
Thinking a little more - we dont really want variable names translated anyway - the scripts will always be in English and using the variables would be tough if they were actually translated to something else. gettext works on a bunch on languages as well as PHP but it is really only working purely with strings. Phil On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > >> 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 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |