Translating Images

If you are planning a multilingual website, you will most likely have images that are language-specific. Our recommended approach is to create two folders in assets, say "en" for English and "fr" for French. Within each of these folders, place all the images for both of the sites, maintaining the same file names for both.

Now, to render the correct path when the page loads, use the {$lang} variable:

<img src="{$assetbase}/images/{$lang}/tout.png">

On http://english.my-app.projects.fm, this will render <img src="http://assets.filemobile.com/681/images/en/tout.png">

0 comments

Be the first to comment on Translating Images.

Add a Comment

  • captcha