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, this will render <img src="">


Be the first to comment on Translating Images.

Add a Comment

  • captcha