We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50831
    • 2 Posts
    Здравствуйте.
    Нужно донастроить сайт от предыдущих разработчиков.
    Есть таблица в на одной из страниц на трех языках.
    В чанке такой код
    <tr>
    <th>[[%tr-number? &language=`[[++cultureKey]]`]]</th>
    <th>[[%tr-location? &language=`[[++cultureKey]]`]]</th>
    <th>[[%tr-status? &language=`[[++cultureKey]]`]]</th>
    <th >[[%tr-date? &language=`[[++cultureKey]]`]]</th>
    </tr>
    Это заголовки таблицы. Мне как раз нужно добавить несколько новых заголовков. Один чанк используется для трех разных контекстов: web, en, kz.
    В зависимости от cultureKey(ru, en, kz) выводит слова на разных языка.
    Например, tr-date может: дата, date, уакыт
    Мне нужно добавить несколько новых колонок. на трех языках.
    Установлен пакет Babel.

    попробовал поискать в корне сайта подобие словаря, но ничего не нашел.
    Но нашел наподобие присваивания значения в кеше
    joxi.ru/Drl7Yo9TBxyDAP

    Значит Modx берет перевод\значение переменной([[%tr]]) из какого то словаря?
    Может в БД?
    Подскажите пожалуйста. Уже три часа не могу найти этот словарь. Или может это реализовано по другому?

    Modx Revo 2.2.16 Traditional

    This question has been answered by express. See the first response.

    • discuss.answer
      • 50831
      • 2 Posts
      Ура.
      Ответ нашелся на ресурсе тостер: https://toster.ru/q/235464?e=2552703#answer_item_629242

      В MODX есть отдельный раздел для настройки словарей в разделе настроек (правый верхний угол меню админки, иконка «шестерёнки) «Управление словарями» (manager/?a=workspaces/lexicon):

      966ff3467af74c6782b4601bb48d5ebf.png

      Параметр [[++cultureKey]] является системной настройкой, определяемой контекстом. Таким образом, можно, добавляя новые ключи в словари, создавать таблицы переводов для разных языков.
        • 54381
        • 2 Posts
        First thing you need to do is install and activate the Polylang plugin. Upon activation, you need to visit Settings » Languages to configure the plugin.

        The language settings page is divided into three tabs. The first tab is labeled ‘Languages’. This is where you add the languages you want to use on your site.

        You will need to add the default language, as well as select all other languages that users can choose on your site.

        After adding the languages, switch to the ‘Strings Translations’ tab. Here you need to translate site title, description, and then choose the date and time format.

        Last step in the configuration is the Settings tab. This is where you can choose a default language for your site and other technical settings. [ed. note: iusemodx last edited this post 5 years, 5 months ago.]