Every interface text has a key with a domain (shop.welcome, theme.read_more) and a value per language. When a translation is missing, the main site language is shown.
Usage
echo __('theme.read_more');
echo __('shop.welcome', ['name' => $user]); // parameters in the text
echo _n('shop.items', $count); // singular / plural
_e('theme.contact'); // echoIn Twig: {{ __('theme.read_more') }}. For page scripts, cms39_i18n_js('shop') outputs the texts of a domain.
Language files
// public/themes/<theme>/languages/en.php — automatic, domain "theme"
return [
'read_more' => 'Read more',
'shop.welcome' => 'Welcome!', // a full key of another domain overrides its text
];
// plugin
cms39_i18n_domain('shop', __DIR__ . '/languages');Administrators change texts under Settings → Translations without touching files. Their changes are stored in the database and survive every update. Keys that were requested but do not exist are recorded so they can be filled in.
E-MAIL or by phone at (+30) +30.2152151245-8