How can I create translation rules?
In this article, you'll learn how to configure your translation rules so that Weglot will always translate a word or a group of words in a certain way (or never translate them at all).
You can create translation rules that will instruct Weglot to always or never translate content in a specific way, giving you further control over your translations.
1. How can I create a translation rule?
First, go to your Weglot Dashboard > Project(s) and click Glossary in the translation section.
You'll then see a pop-up allowing you to create a translation rule:
- Select the type of rule you want to apply to your translations: Never translate or Always translate
- Decide if you want the rule to be applied to all the language pairs or just to a specific one
- Then, type the (group of) word(s) you want to always/never translate. There is a limit of 5 words per rule.
- Finally, click on the "Save" button.
Your rule has now been added to your Glossary.
2. Additional information
- You can delete a rule at any moment by clicking on the trash icon on the right-hand side of the rule.
- Translation rules will only be applied to your automatic translations, not manually-edited ones.
- Translation rules do not prevent the translations from being generated and counted in your Current Word Usage. You must exclude the URL of the page or the CSS selector to exclude some content from the translation. See: How to exclude URLs/blocks/words from translation? (Points 1 and 2 only).
- If a Glossary rule is matching a whole translation, this translation will be marked as manually edited. However, if a rule matches only a part of a translation, this translation will remain marked as automatic.
3. What does "Case sensitive" mean?
If you check the 'Case sensitive' option, Weglot will differentiate between uppercase and lowercase characters in the content and treat them as separate words.
CASE SENSITIVE ON: The rule will apply only to the word 'Apple' in this example:
CASE SENSITIVE OFF: The rule will be applied to the words 'Apple,' 'apple,' 'APPLE,' or 'aPpLe,' and so on.
4. How to import/export translation rules?
To import or export translation rules, you need to manage at least an Advanced plan (see our pricing page).
To access this feature, you need to go to the "Glossary" page on your Weglot dashboard and use the "Actions" button:
Please note that you can import only CSV files, with a maximum of 2000 Glossary rules and the files need to fit a specific structure. You can download an example file.
It is important not to modify the headers/the structure of the file because the import will not work as intended if the headers are modified.
To do an import, you can drag the file or click on the "Add" button.
Once the file is added, just click on "Next" and it will be imported.