Similar to translating texts, images can also be localized by utilizing a similar idea.
- Create a directory, into which images are sorted
- Images are sorted into it with a key. This key can be the name of a language, the same name you used in the previous steps
- After displaying the directory on a page (as a resource, instead of a direct image), the user's selected language will be used to retrieve the actual image, and display this instead.
This mechanism can be used to, for instance, use images with text on it. Users of different nationalities should still be able to read it.
- Navigate to the media manager.
- In the upper left corner, click on the 'Plus'-icon.
- Enter a name for your image-directory, for example 'Logo_directory'.
- Confirm with 'OK'.
- Now, you should see a new entry with a folder-icon.
- Next to it, click on 'link to images'.
- Click on 'Enter new key...', and enter your language code
- For english, this would be 'EN-US', for german, it would be 'DE' - list of all languages
- A new entry has appeared. Click on the empty frame in the center of that line.
- In the new dropdown list, select your icon from the first tutorial.
- Confirm the changes with 'SAVE' at the bottom.
Now, you have created a directory, and set it up so that it is linked to your icon for the language of your choice. Users that would see this directory will see your icon instead, if they are using the language you just chose. Similarly, you could add a second language, and map it to another image.