Forum OpenACS Q&A: Re: ACS-LANG

Collapse
5: Re: ACS-LANG (response to 1)
Posted by Dave Bauer on
The message would contain the HTML to display the image.

like

<img src="/images/en_US_whatever.jpg">

You can embed any HTML In the message. You can refer to variables available in the page as well by surrounding the variable name with % ie: %varname%

In this case it might not be a big win to use acs-lang but instead of your complex switch statement I would name the images with the locale so you can do something like

img src="@mailto:user_locale@_image_name.jpg";

or place them in a folder by locale

img src="/images/@mailto:user_locale@/image_name.jpg";

This is more flexible. It would be interesting to discuss other ways to abstract this type of user interface element. I still think its probably best to use the message keys, then all your localization is done in one place.

Collapse
6: Re: Re: ACS-LANG (response to 5)
Posted by Iuri Sampaio on
I will read the I98n docs first of all.
Just give me time to abstract that.