Modules can provide custom translations in their directories or point to a remote file. These definitions are added to the module's info.yml file. First, you will need to specify the interface translation project key if it differs from the project's machine name.
You will then need to specify a server pattern through the interface translation server pattern key. This can be a relative path to Drupal's root, such as modules/custom/mymodule/translation.po, or a remote file URL at http://example.com/files/translations/mymodule/translation.po.
Distributions (or other modules) can implement hook_locale_translation_projects_alter to provide this information on behalf of modules or to alter defaults.
The server pattern accepts the following different tokens:
- %core: Indicates the version of a course (for example, 8.x)
- %project: Indicates the project's name
- %version: Indicates the current version string
- %language: Indicates the language code
More information on the interface translation keys and variables can be found in the local.api.php document file located in the interface translation module's base folder.