To install Translatable Product and Category Descriptions you can Click here to visit the app installation page and follow the on screen instructions.
Once installed a Translatable Product and Category Descriptions tab will be added to your Store's Control Panel Settings area:
When multiple language blocks are found in a description but the visiting customers language does not match any of them this setting will determine which language block is shown to them.
The default is English.
An example would be if your description has Spanish and Russian language blocks but the customer is an English speaker. If this setting is not set to Spanish or Russian they will NOT see either block and could possibly see a Blank page.
Language blocks also known as Shortcodes are used to show language specific content to your store visitors.
To use a language block you simply add the following to a Product or Category description:
LOCALE_CODE is the code of the necessary language, for example en, es, fr, de.
A list of available codes can be found here: List of ISO 639-1 codes
Make sure to use the 2 letter "639-1" code.
3 Language blocks:
In this example, English visitors will only see "English", Spanish will only see "Español" and Russian visitors will only see "русский". A visitor who spoke something else, for example German would see nothing. To show those visitors content make sure to set a Default Language and have that Language Block available.
2 Language blocks with content outside that will be visible to all visitors.
In this example all visitors will see "Everyone will see this!". But Spanish or Russian visitors will see the extra content contained within their Language Block.
Language blocks don't have to be on a single line:
This can be useful if you would like to allow visitors the ability to choose a language to be displayed.
Here are a few examples using our demo store:
Force English: ?lang=en
Force Spanish: ?lang=es
Force Russian: ?lang=ru
An extremely simple "Language Selector" for your store could be the following:
<p>Choose your langauge: <a href="?lang=en">English</a> / <a href="?lang=es">Spanish</a> / <a href="?lang=ru">Russian</a></p>
You want to make sure that your description HTML isn't being decoded. This can break the app and cause language blocks to appear broken.
To fix this, edit your description in HTML mode. The image below shows a product page with an arrow pointing at the HTML mode button.
Once in HTML mode you will see the "source code" of the products description. This is the raw HTML that is displayed and editing in this mode will stop HTML from being automatically decoded.
You will know if your HTML was decoded if you see a lot of the following mixed in your description:
Here's what the above would look like in your final description:
Below is an image of a description that has been decoded and would not be displayed correctly