
- 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 ms3ProductsgetCurrentLanguage returns key, cultureKey, name, or http_host; format=json returns a JSON stringlocfield, locoptioncaption, locproductoptionvaluegetLocalizedCanonical, getLocalizedSitemapOnBuildLocalizationTabs event for custom form fieldsmgr/content/duplicate); shared TVs are not copiedlocalizator3| 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.false and the install process is aborted. VueTools 1.1.2-pl or newer is required.pdoTools package if none is installed or the installed version is older than 2.11.3-pl.false and the Localizator3 install is aborted.true anyway.The tab and the Localization 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 needed for direct pdoResources and pdoMenu calls. FetchLocalizator provides 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.