I’m setting up my basic skeleton / boilerplate I want to use for all wordpress projects. I follow Mark Jaquiths approach and include WP as a submodule. He gets it from https://github.com/WordPress/WordPress. Many of my clients are from Germany and require German language files for administration.
Is there a way I can include the localized files into my skeleton git repository?
I would strongly advise against this. The repo, as storage of language files, is being discontinued, in favor of Translate WordPress. Right now, you have no guarantees that the repo has a current version of the file.
The current method of getting language files is either to download (export) them directly from Translate WordPress individually (core, admin, network and themes). You can access that directly with something like:
http://translate.wordpress.org/projects/wp/dev/de/default/export-translations?format=mo (for the .mo, replace with format=po for the .po)
Above examples are for core files only, you’d need to repeat that for /wp/dev/admin/de/default, wp/dev/admin/network/de/default, and the themes.
You can “curl” all that, obviously.
We’re aware that the method is a little convoluted at the moment, but we’re working on a better export tool.
Installing languages in WordPress Skeleton is pretty much the same as in a standard WP install. All WP-Skeleton does is alters the paths to accommodate WP as a Git submodule. This means instead of installing languages files under
wp-content/languages
orwp-includes/languages
, you need to place them incontent/languages
.Basically, all you need to do is:
content
calledlanguages
. Place all of your.mo
(and optionally.po
) files here.wp-config.php
and set theWP_LANG
constant on line 51.http://wpcentral.io/internationalization/ru/
Now SSH to your server and do this:
cd wp-content/languages
wget http://downloads.wordpress.org/translation/core/4.0/ru_RU.zip
unzip ru_RU.zip
rm ru_RU.zip
Of course, the link and the *.zip file name will vary for your particular language.