Exclude from localization
How to mark text that should not be localized?
You can exclude any text element from localization by using HTML attribute data-gp-noloc
on the HTML Element. Below you can find example, where a company name will not be translated:
This approach allows adjustments in the site layout when content that should not be translated appears in different elements. Glopal Translator Engine allows the definition of a glossary of non-translatable phrases, that is better suited for excluding brand names that can appear anywhere in the site content (product titles, descriptions etc.) without the requirement for any special markup. The list of Non translatable terms should be defined from the Translation Editor Tool.
Scope
By default, data-gp-noloc
applies only on a given element and will prevent all localizations of element and its attributes, including translations, URL rewrite and price localization.
If you need to disable translation on all the elements inside a subtree you can adjust the scope data-gp-noloc="subtree"
. In this example, content of all elements inside the address tag (strong and two spans) will be excluded from localization.
Type
By default, data-gp-noloc
will deactivate localization on the element (or subtree). By pairing them with an extra attribute data-gp-noloc-type="text,price,url"
, you can keep some of localization (eg. translations), while deactivating url rewrite or price localization.
For example, if you want to exclude text elements from being translated while keeping prices converted, you can pair data-gp-noloc="node"
or data-gp-noloc="subtree"
with extra attribute data-gp-noloc-type="text"
This will disable text translation for all elements inside but still keep all prices localized.
Other possible values for gp-noloc-type
attributes will do following:
data-gp-noloc-type="text,url"
disables translations and link rewritedata-gp-noloc-type="text,price"
disables translations and price localizationdata-gp-noloc-type="url,price"
disables price localization and link rewrite
How to mark prices that should not be converted ?
If you want to deactivate conversion of specific prices showing on your localized sites or in localized emails, you can use the same data-gp-noloc="node"
or data-gp-noloc="subtree"
attributes.
Here is an example:
How to mark URLs that should not be localized ?
All URLs showing on localized sites are rewritten by default so that users can browse the site with convenience. It may happen that you wish some urls to not be rewritten to keep them pointing to the same destination as they appear on your source site.
You can exclude any URL from localization using the same data-gp-noloc="node"
or data-gp-noloc="subtree"
attributes. Below is an example:
Last updated