Sitecore can easily manage various types of text data in multiple languages. In addition to the default English language, you only need to add a language to sitecore, such as Chinese ~ You can create a Chinese version for items under/sitecore/content.
This makes it easy to manage text data in multiple languages. But in fact, we can and should manage images of the "data" type in multiple languages.
Here, I refer to "data" images that contain "data" to distinguish them from those used for layout background images.
For example, different languages and texts appear in product photos. Even for users in non-language regions, product packaging is different.
In the media library of sitecore, the default Image Upload type is unversioned, that is, the image is of no version. The result is:
- For "different versions" of "one image", we need to upload multiple images, which are multiple items in the media library. For example, the pictures of the same product, English and Chinese, are two independent items and there is no connection between them.
- When we edit the English version of the "product" item, we reference image A (the English version of the product diagram), but it is still the same product. When we edit the Chinese version, image B needs to be referenced (the Chinese version of the product diagram ). The same image item must be referenced multiple times.
- When there are many product images, a large number of images will appear in the media library, making it increasingly difficult to manage. For example: Product_1_en.jpg, Product_1_cn.jpg, Product_2_en.jpg, and Product_2_cn.jpg.
The solution is to first select the current language version as English in the Media library, and use Upload Files (Advanced) to Upload the English version of a product, check "Make Uploaded Media Items Versionable", so that the Uploaded images are differentiated by version. Click the language switch icon in the upper right corner to switch to the Chinese version, and Attach a Chinese image of the product. The result is:
- The "same image" only appears in the Media library, which greatly reduces the number of items in a multi-language environment.
- Images in different languages are associated in a unified manner.
- The bigger advantage is that we only need to link this image item once in the "product" item. When we switch the language version of the product item, the image will automatically switch the language version along with it.