
- MODX 3
- PHP 8.2
- Vue 3


Multilingual sites for MODX Revolution 3 without separate contexts. For MODX 2.x use Localizator.
getLocalizedResources on top of pdoResources, pdoMenu, msProducts, and ms3Productslocfield, locoptioncaption, locproductoptionvaluegetLocalizedCanonical, getLocalizedSitemapOnBuildLocalizationTabs event for custom form fields| Requirement | Version |
|---|---|
| MODX Revolution | 3.0+ |
| PHP | 8.2+ |
| VueTools | 1.1.2-pl+ |
| pdoTools | 2.11.3-pl or newer |
| Friendly URLs | enabled |
Optional: MiniShop3, mSearch.
Hard transport requirements: PHP and MODX only.
vuetools package from the provider. It does not upgrade an already installed VueTools below 1.1.2-pl.pdoTools package if none is installed or the installed version is older than 2.11.3-pl.The tab and the Localizations page show a warning if the vuetools service is down or the built languages.min.js / tab bundle is missing. Without pdoTools, getLocalizedResources cannot find pdoResources.
Package: modstore.pro/packages/utilities/localizator3.
localizator3_default_language.getLocalizedResources.Quick start and System settings.
The open page language comes from the language http_host, not from localizator3_default_language.
Внимание
An empty key falls back to the first active language by rank only in manager auto-translation and the translate_resources.php CLI. Without the setting and without an active language, auto-translation and CLI stop with an error. On the resource form an empty key stays empty.
getLocalizedResources localizes resource fields itself, without the FetchLocalizator class. FetchLocalizator is for direct pdoResources and pdoMenu calls: the same fields, localized TVs, and the language prefix in links.
The resolver sets pdotools_fetch_class = ModxPro\PdoTools\FetchLocalizator (extends Fetch). Before OnMODXInit, MODX loads the namespace bootstrap.php. The file loads Composer PSR-4 (vendor/autoload.php). The plugin does the same on OnMODXInit.