Translation

If you are using products from different Amazon stores with or without ASA2’s internationalization feature (see: Internationalization (i18n)), you most likely want to display the product template in the appropriate language. This is possible without very much effort with ASA2’s translation feature.

You can find it by navigation to section “Templates” …

ASA 2 menu item

… and clicking the tab “Translation”:

translation tab

By default ASA2 comes with a set of predefined translation items used in the builtin default template.

Screencast

Create new translation

You can create new translations by clicking the button “Create new translation”. On the form page, you have to enter a key for the new translation. This must be unique and will be used as reference in templates.

Another mandatory field is the translation value for the country store that is configured as default under Default Tracking ID and Store.

Now enter as much translations for other countries as you do support on your site.

Optionally you can write a comment which can be seen as a tooltip on the overview page.

translation form

Embedding translations

Translations can be embedded in your templates by using the translate function with a translation key as parameter.

This example shows how to embed the translation “price”:

{{ translate("price") }}

This is a more complex example using Conditions:

<b>{{ translate('price') }}:</b>
{% if OffersFallbackPriceFormattedPrice is not empty %}
    {{ OffersFallbackPriceFormattedPrice }}
{% else %}
    {{ translate("not_available") }}
{% endif %}

Learn more about Template Syntax.

How it works

The translation function takes a product’s country code as basis.

For example, if you embed a product from Amazon’s US store with a translated template, all US values will be used. If you embed another product on the same page from the german store with the same template, it will use the german translation values. If ASA2 does not find a translation value for a requested country code, it takes the default country’s value. If even that is not available, it will show the key.

translation flowchart

Reinstall presets

ASA2 ships with default translations. They are used in the Managed Templates. So it is very important to keep them, if you are using the managed templates.

If the default templates got lost however, you can reinstall them by clicking the button “Reinstall presets”. It will only create those translations which are not existing already. No duplicates will be created. So if you want a clean install, you can delete all presets and click the button.

reinstall presets