Welcome Guest, Not a member yet? Register   Sign In
Advanced Translations?
#5

[eluser]xwero[/eluser]
I haven't used the language functions of CI but the way i do it is to have a placeholder in the string
Code:
// language files
$some_string_en = 'You have [NUMBER] new messages.';
$some_string_nl = 'U hebt [NUMBER] nieuwe berichten.';
// controller
echo strtr($some_string_lang,'[NUMBER]',123);

Maybe it should be build in somewhere in the functions to recognize placeholders.


Messages In This Thread
Advanced Translations? - by El Forum - 10-16-2007, 03:06 PM
Advanced Translations? - by El Forum - 10-16-2007, 04:59 PM
Advanced Translations? - by El Forum - 10-16-2007, 05:01 PM
Advanced Translations? - by El Forum - 10-16-2007, 05:40 PM
Advanced Translations? - by El Forum - 10-17-2007, 11:01 AM
Advanced Translations? - by El Forum - 10-17-2007, 08:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB