How to get a localized version of WordPress from a repository?

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?

Related posts

3 comments

  1. Download your languages files from the SVN repo…

    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.

  2. 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 or wp-includes/languages, you need to place them in content/languages.

    Basically, all you need to do is:

    1. Download your languages files from the SVN repo. There is no need to add this repo as a submodule; just manually download the language files you require.
    2. Create a folder under content called languages. Place all of your .mo (and optionally .po) files here.
    3. Open up wp-config.php and set the WP_LANG constant on line 51.
    1. Go to http://pcentral.io/internationalization/ and find the official website of the desired language
    2. Click the »More« link to open the official website related to that particular translation. For example, for Russian it is currently:
      http://wpcentral.io/internationalization/ru/
    3. Find a »Download Language Pack« button and copy the URL. E.g.: http://downloads.wordpress.org/translation/core/4.0/ru_RU.zip
    4. 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.

Comments are closed.