feat(multi-language): Add multi-language support and routing updates
Add configuration for multiple languages in the Website Manager
This commit is contained in:
@@ -13,6 +13,14 @@ Plugi is a website boilerplate with a drag-and-drop page builder.
|
||||
|
||||
See the [Plugi documentation](https://plugi.paulspenke.com/) for the full installation guide, including manual deployment, Docker development, security, and troubleshooting.
|
||||
|
||||
## Multilingual pages
|
||||
|
||||
In Website Manager settings, enable the languages the site should use and select a default site language from that enabled list. Older installations without a saved `default_language` continue to use their saved `admin_language` value until a default is saved.
|
||||
|
||||
Each page translation has its own editable route. New routes use `/slug` for the default language and `/{locale}/slug` for other enabled languages. Saving a changed route adds a leading slash, removes trailing and repeated slashes (except `/`), and lowercases static path segments; route matching also ignores case and slash variants. Named parameters such as `{id}` and a trailing `*` wildcard remain supported.
|
||||
|
||||
Changing the default language affects new route suggestions but does not rewrite existing page URLs. Disabling a language makes its routes unavailable publicly while keeping its translations; re-enabling it restores those routes. See the [Plugi documentation](https://plugi.paulspenke.com/) for the full guide.
|
||||
|
||||
## Local Docker development
|
||||
|
||||
The supplied Compose stack uses PHP 8.4 and MySQL 8.0 and is for local development only. Copy `.env.dist` to `.env` and `config.dist.php` to `config.php`, replace the sample database and MySQL root passwords, then run:
|
||||
|
||||
Reference in New Issue
Block a user