Last active
July 6, 2023 11:31
-
-
Save koseki/6019909 to your computer and use it in GitHub Desktop.
Download Wordpress translation files.
Execute inside the wp-content/languages directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# Download Wordpress translation files. | |
# Execute inside the wp-content/languages directory. | |
# | |
# http://codex.wordpress.org/Installing_WordPress_in_Your_Language | |
# http://ja.wordpress.org/install-ja/ (ja) | |
# | |
VERSION=3.5.x | |
WPLANG=ja | |
wget -O default-$WPLANG.mo "http://translate.wordpress.org/projects/wp/$VERSION/$WPLANG/default/export-translations?format=mo" | |
wget -O admin-$WPLANG.mo "http://translate.wordpress.org/projects/wp/$VERSION/admin/$WPLANG/default/export-translations?format=mo" | |
wget -O admin-network-$WPLANG.mo "http://translate.wordpress.org/projects/wp/$VERSION/admin/network/$WPLANG/default/export-translations?format=mo" | |
wget -O continents-cities-$WPLANG.mo "http://translate.wordpress.org/projects/wp/$VERSION/cc/$WPLANG/default/export-translations?format=mo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, this was very helpful to me to understand how to download Japanese language files for a WordPress Dockerfile. I found that if you change the name of the default .mo from
default-$WPLANG.mo
to$WPLANG.mo
then WordPress will recognize it in the General Settings language drop down menu and display it as日本語
instead ofdefault-ja.mo
.Thanks for sharing this great resource.