Alert: This page is still a draft and being actively written. If you find an error, please comment below.
[Information on interacting with the translation repository and all the processes involved. Some overlap with Core Contributor Handbook as needed. Also grabbing information from here.]
The WordPress Localization Repository at http://i18n.svn.wordpress.org/ is a Subversion repository where official WordPress translations are maintained. Various teams collaborate on translations for their native language, and team maintainers commit updates and changes to the repository.
Participation in the repository is open to anyone. Simply visit the WP Polyglots Blog, introduce yourself, and let everyone know what translation you’d like to work on. If there is already a team for your language and locale, they’ll let you know and you can join them. If not, you can either volunteer to be a maintainer for your language and locale, or simply contribute your localization and the repository maintainers will add it.
Guidelines and requirements #
Note: these guidelines are subject to change as the system evolves; repository maintainers will be happy to assist you in updating the files you maintain in the repository should these guidelines change.
Character Encodings #
All localizations should have at least a UTF-8 version, but may optionally add versions in other character encodings popular for that locale.
Current PHP versions don’t support Byte Order Markers (BOMs), so be sure the UTF-8 encoded files you contribute do not have them.
HTML Character Entities #
With a few exceptions (noted below), all translations should be written literally, rather than escaping accented and special characters with HTML character entities.
Some characters must be escaped to avoid conflict with XHTML markup: angle brackets (< and >), and ampersands (&). In addition, there are a few other characters better used escaped, such as non-breaking spaces ( ), angle quotes («and »), curly apostrophes (’) and curly quotes.
For more information about the W3C’s best practices involving character encodings and character entities, see the following references:
Repository File Structure #
The repository contains directories for each locale, which are named as follows:
- ISO 639 language code (lowercase) or
- ISO 639 language code (lowercase) + an underscore + ISO 3166-1 alpha-2 country code (uppercase) or
- ISO 639-3 language code (lowercase)
Within each locale’s directory are the regular Subversion versioning directories: branches/, tags/, and trunk/.
Inside the appropriate versioning directory are the following subdirectories:
This directory contains the Gettext MO and PO files for the locale. Message files are named after the locale name.
akismet folder, place the translation of the i18n-ed Akismet Plugin using exactly the same PO/MO filename as above.
twenty- folders, place the translation of the i18n-ed default themes, residing at the wordpress-i18n svn repository.
You can also translate the default plugin & themes using GlotPress (translate.wordpress.org) instead.
This directory contains all files in the WordPress distribution that cannot be Gettexted, which have been translated into the target locale.
If the locale has only a UTF-8 translation of the files, the dist/ directory may be populated with them directly, and the structure within dist should mirror the structure of the WordPress root directory:
It is better to translate the i18n-ed themes (see the messages/ part above), instead of using the theme/ directory.
Similarly to the dist/ dir, theme/ contains hard-translated theme files. If only a UTF-8 translation is present, the directory can be populated with subdirectories for each theme translated. These subdirectories contain all of the same files as the original theme (except that they’re translated), and are named the same as the original theme:
Just as with the dist/ directory, if there are multiple character encodings represented, theme/ should contain a subdirectory for each character encoding, which in turn would contain subdirectories for each theme translated.