The WordPress Localization Repository at i18n.svn.wordpress.org is a Subversion repository where official WordPress translations are maintained.
The repository is used to store the source strings of WordPress core and the translations of plugins, themes and WordPress core. Some locales are also using it to customize WordPress core like adding a translated readme file or a translated sample config file.
For new locales, we do not recommend making custom modifications and therefore no longer provide SVN access by default.
Guidelines and Requirements
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.
Line Endings
Files should have Unix style line endings, also named Line Feed (LF).
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/. No other directories are allowed.
It’s recommended to keep the tags/ directory empty and only use branches/ and trunk/.
Inside the appropriate versioning directory are the following subdirectories:
dist/
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:
- dist/
- readme.html
- wp-config-sample.php
- …
- wp-admin/
- …
messages/
This directory is deprecated in favour of managing the translations directly on translate.wordpress.org.
This directory contains translations in PO and MO format.
Keep up to date with the latest development
Any customizations must be kept up to date with the original source. For example a requirements change in readme.html needs to be documented in your translated version as well.
It’s required that any by default included plugins is also hosted on the WordPress Plugin Directory and must be compatible with the latest stable WordPress release. Otherwise the plugin must not be bundled with the localized release.