Skip to content

Commit f1d6bf3

Browse files
committed
feat: move from koodimonni-language to inpsyde/wp-translation-downloader
1 parent 9eda1c0 commit f1d6bf3

3 files changed

Lines changed: 24 additions & 42 deletions

File tree

README.md

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -118,59 +118,33 @@ The `post-cmd.sh` script automatically syncs WordPress core files from `private/
118118

119119
## Optional: Installing Language Packs
120120

121-
WordPress core and plugins can be installed in different languages using Composer.
121+
WP Boot includes [WP Translation Downloader](https://github.com/inpsyde/wp-translation-downloader), a Composer plugin that automatically downloads translations from the WordPress.org API for all installed WordPress packages (core, plugins, and themes).
122122

123-
**1. Add the language repository to `composer.json`:**
124-
```json
125-
{
126-
"repositories": [
127-
{
128-
"type": "composer",
129-
"url": "https://wp-languages.github.io",
130-
"only": [
131-
"koodimonni-language/*",
132-
"koodimonni-plugin-language/*",
133-
"koodimonni-theme-language/*"
134-
]
135-
}
136-
]
137-
}
138-
```
123+
**1. Add your desired languages to `composer.json`:**
124+
125+
In the `extra.wp-translation-downloader.languages` array, add the locale codes you need:
139126

140-
**2. Add dropin paths to `extra` in `composer.json`:**
141127
```json
142128
{
143129
"extra": {
144-
"dropin-paths": {
145-
"../../public/wp-content/languages/": [
146-
"vendor:koodimonni-language"
147-
],
148-
"../../public/wp-content/languages/plugins/": [
149-
"vendor:koodimonni-plugin-language"
150-
],
151-
"../../public/wp-content/languages/themes/": [
152-
"vendor:koodimonni-theme-language"
130+
"wp-translation-downloader": {
131+
"languages": [
132+
"it_IT"
153133
]
154134
}
155135
}
156136
}
157137
```
158138

159-
**3. Install language packs:**
160-
```bash
161-
# WordPress core in Italian
162-
composer require koodimonni-language/core-it_it
139+
Then run `composer update` — translations will be automatically downloaded to `public/wp-content/languages/`.
163140

164-
# All translations for Italian
165-
composer require koodimonni-language/it_it
166-
```
141+
**2. Configure WordPress to use the language in `.env`:**
167142

168-
**4. Configure WordPress to use the language in `.env`:**
169143
```env
170144
WPLANG=it_IT
171145
```
172146

173-
For more information: https://wp-languages.github.io
147+
For more information: https://github.com/inpsyde/wp-translation-downloader
174148

175149
## Optional: Disallow Search Engine Indexing in Non-Production
176150

@@ -201,6 +175,7 @@ For new projects or when you have full control over the infrastructure, consider
201175
- **[WP Starter](https://github.com/wecodemore/wpstarter)** - Composer-based WordPress setup with flexible configuration
202176
- **[Wordplate](https://github.com/vinkla/wordplate)** - Modern WordPress stack with Laravel-inspired structure
203177
- **[WordPress Project](https://github.com/johnpbloch/wordpress-project)** - Minimal Composer-based WordPress installer
178+
- **[WP Bootstrap](https://github.com/eriktorsner/wp-bootstrap)** - Utils for bootstrapping a WordPress installation
204179

205180
## References
206181

@@ -239,5 +214,5 @@ See [CONTRIBUTING](.github/CONTRIBUTING.md) for detailed guidelines.
239214

240215
## License
241216

242-
(ɔ) Copyleft 2025 [Frugan](https://frugan.it).
217+
(ɔ) Copyleft 2026 [Frugan](https://frugan.it).
243218
[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/), see [LICENSE](LICENSE) file.

bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function fixMissingEnvVars(
123123
/**
124124
* Set WordPress environment type based on WP_ENV
125125
* Uses WordPress 5.5+ native WP_ENVIRONMENT_TYPE
126-
* Accepted values: 'local', 'development', 'staging', 'production'
126+
* Accepted values: 'local', 'development', 'staging', 'production'.
127127
*/
128128
$wp_env = env('WP_ENV') ?: 'production';
129129
if (!defined('WP_ENVIRONMENT_TYPE') && in_array($wp_env, ['local', 'development', 'staging', 'production'], true)) {

composer.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"require": {
2727
"php": ">=8.1",
2828
"composer/installers": "^2.2",
29+
"inpsyde/wp-translation-downloader": "^2.6",
2930
"johnpbloch/wordpress": "6.9.4",
3031
"oscarotero/env": "^2.1",
3132
"vlucas/phpdotenv": "^5.5"
@@ -36,11 +37,12 @@
3637
},
3738
"repositories": [
3839
{
40+
"name": "wp-packages",
3941
"type": "composer",
40-
"url": "https://wpackagist.org",
42+
"url": "https://repo.wp-packages.org",
4143
"only": [
42-
"wpackagist-plugin/*",
43-
"wpackagist-theme/*"
44+
"wp-plugin/*",
45+
"wp-theme/*"
4446
]
4547
}
4648
],
@@ -50,6 +52,7 @@
5052
"allow-plugins": {
5153
"composer/installers": true,
5254
"ergebnis/composer-normalize": true,
55+
"inpsyde/wp-translation-downloader": true,
5356
"johnpbloch/wordpress-core-installer": true
5457
},
5558
"optimize-autoloader": true,
@@ -68,7 +71,11 @@
6871
"type:wordpress-theme"
6972
]
7073
},
71-
"wordpress-install-dir": "vendor/wordpress"
74+
"wordpress-install-dir": "vendor/wordpress",
75+
"wp-translation-downloader": {
76+
"languageRootDir": "../../public/wp-content/languages",
77+
"languages": []
78+
}
7279
},
7380
"scripts": {
7481
"post-install-cmd": "@post-cmd",

0 commit comments

Comments
 (0)