Welcome Guest, Not a member yet? Register   Sign In
Best Practice for Multi-Lingual Support
#4

[eluser]CodeIgniterNewbie[/eluser]
xwero,

It's the inline markup that creates a problem. If the markup was just going to surround the string, then I would suggest keeping the language files "pure" and not have any mark up in it.

But what is the best way to deal with content that has inline markup? For example:

"Of all the colors, <strong>pink</strong> is my favorite color."

Do you suggest the following:

$lang['favorite_color'] = 'pink';
$lang['favorite_color_statement'] = 'Of all the colors, %s is my favorite color.'

You would need to get $lang['favorite_color'], wrap it in <strong> tags, then put it in $lang['favorite_color_statement']. What if there were multiple nestings of inline markup? Can you imagine the headache?


Messages In This Thread
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 02:00 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 07:02 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 07:19 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 08:06 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 08:36 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 08:40 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 09:07 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 09:26 AM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 01:56 PM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 08:15 PM
Best Practice for Multi-Lingual Support - by El Forum - 09-04-2008, 09:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB