Content translation/Machine Translation/Configuration

Machine Translation configuration for ContentTranslation stays in various repositories:


 * ContentTranslation
 * cxserver
 * deployment-charts (WMF specific configuration, config file names for MT and API keys (private) only)
 * mediawiki-config

Add new languages in existing Machine Translation
Update  file (example: Google.yaml) for new language. Make sure to check respective web service APIs if language is listed there. For example, Google Translate supported languages are listed with code at: https://cloud.google.com/translate/docs/languages

Default machine translation for language pairs

 * Update  This affects production. For local testing, use

Example:

Adding machine translation for closely related languages

 * Update lib/mt/MTSERVICE.js as needed.

For example, update googleLanguageNameMap in lib/mt/Google.js to add new mapping for closely related languages.

Removing language from the target

 * Update, add 'notAsTarget' block for a language that not needed as the target in Machine Translation.

Example: If we don't need 'xy' language as a target:

Update machine translation threshold for a wiki

 * Update
 * Set value in  as needed.

Disable or enable machine translation for a wiki

 * Update
 * Set  (  or  )

Add new Machine Translation service
Add code as mentioned in the above page. Update configuration in deployment-charts repository and this also requires coordination with SRE team for deploying private API key. It may also require security review.