Install wordpress using composer in a specific language

I'm using composer to automatically deploy wordpress on a ubuntu-server. Additionally, I need to install the german

I'm using composer to automatically deploy wordpress on a ubuntu-server. Additionally, I need to install the german language pack. I learned that there are some guys who create composer-packages from the wordpress files. Using the following composer.json I get wordpress with german language pack:

{
    "repositories": [{
        "type": "composer",
        "url": ""
    }],
    "require": {
        "johnpbloch/wordpress": "4.6",
        "koodimonni-language/core-de_de": "*"
    },
    "extra": {
        "wordpress-install-dir": "wp",
        "dropin-paths": {
            "wp/wp-content/languages": ["vendor:koodimonni-language"],
            "wp/wp-content/languages/plugins/": ["vendor:koodimonni-plugin-language"],
            "wp/wp-content/languages/themes/": ["vendor:koodimonni-theme-language"]
        }
    }
}

The problem is, that wordpress itself is still in english. Is it possible to set it automatically to german, so that I don't have to do this manually for every site in the adminpanel?

I'm using composer to automatically deploy wordpress on a ubuntu-server. Additionally, I need to install the german language pack. I learned that there are some guys who create composer-packages from the wordpress files. Using the following composer.json I get wordpress with german language pack:

{
    "repositories": [{
        "type": "composer",
        "url": "https://wp-languages.github.io"
    }],
    "require": {
        "johnpbloch/wordpress": "4.6",
        "koodimonni-language/core-de_de": "*"
    },
    "extra": {
        "wordpress-install-dir": "wp",
        "dropin-paths": {
            "wp/wp-content/languages": ["vendor:koodimonni-language"],
            "wp/wp-content/languages/plugins/": ["vendor:koodimonni-plugin-language"],
            "wp/wp-content/languages/themes/": ["vendor:koodimonni-theme-language"]
        }
    }
}

The problem is, that wordpress itself is still in english. Is it possible to set it automatically to german, so that I don't have to do this manually for every site in the adminpanel?

Share Improve this question asked Sep 4, 2016 at 10:18 LionLion 1294 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The current WP versions expose interface for this and store locale in WPLANG option. Depending on your tools you could set it up during your spin up process (for example with WP CLI).

Older version used WPLANG constant in wp-config.php. I think it should still work on a fresh install (if you don't have option set up) so you could include it in whatever process you use to write wp-config.php.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745292595a4620950.html

相关推荐

  • Install wordpress using composer in a specific language

    I'm using composer to automatically deploy wordpress on a ubuntu-server. Additionally, I need to install the german

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信