Unable to add Ukrainian interface language

I’m trying to add a new interface language to the latest version of TAO Community Edition.

I deployed TAO to Docker using the instructions here: Installing and managing TAO Community Edition

I used the instructions from Github to add the locale: taohub-articles/forge/Documentation for core components/internationalization.md at master · oat-sa/taohub-articles · GitHub

Here’s what I did:

1. Created the Ukrainian language in TAO and extensions:

php taoTranslate.php -v -f -a=create -l=uk-UK -ll=“Ukrainian” -e=tao,taoBackOffice,taoCe,taoDacSimple,taoDelivery,taoGroups,taoItems,taoLti,taoQtiItem,taoQtiTest,taoQtiTestPreviewer,taoTestTaker,taoTests

2 For each extension I ran create/update/compile:
php taoTranslate.php -v -f -a=create -e=tao -l=uk-UK

php taoTranslate.php -v -a=update -e=tao -l=uk-UK

php taoTranslate.php -v -a=compile -e=tao -l=uk-UK

3 Launched php taoUpdate.php

4 Added to /tao/locales/uk-UK/lang.rdf:

<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.tao.lu/Ontologies/TAO.rdf#" xmlns:tao="http://www.tao.lu/Ontologies/TAO.rdf#" > <rdf:Description rdf:about="http://www.tao.lu/Ontologies/TAO.rdf#Languk-UK"> <rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#Languages"/> <rdfs:label xml:lang="en-US"><!\[CDATA\[Ukrainian\]\]></rdfs:label> <rdf:value><!\[CDATA\[uk-UK\]\]></rdf:value> <tao:LanguageUsages rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#LanguageUsageGUI"/> <tao:LanguageUsages rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#LanguageUsageData"/> <tao:LanguageOrientation rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#OrientationLeftToRight"/> </rdf:Description> </rdf:RDF>

5 Added to Updater.php:

OntologyUpdater::syncModels(); $iterator = new FileIterator(_DIR_ . ‘/../../locales/uk-UK/lang.rdf’); $rdf = ModelManager::getModel()->getRdfInterface(); /* @var \core_kernel_classes_Triple $triple */ foreach ($iterator as $triple) { $rdf->add($triple); }

As a result, the language still doesn’t appear in the interface language selection in the user settings. What am I doing wrong?

Hello,

the instructions you followed here are related to Authoring (TAO Core) which is accessible in TAO Community Edition in Content Bank.

The Portal component is built separately, it already embeds uk-UA locale tao-portal/frontend/src/locale/uk-UA/messages.po at main · tao-ce/tao-portal · GitHub

This documentation may help you changing default language:

TAO_CE_DEFAULT_LOCALE=uk-UA docker compose up -d

I installed TAO in docker according to the instructions: link

When creating the container, I set the localization in the tao.yaml file:
spec:
publicDomain: mydomain.name
defaultLocale: uk-UK
dependencies:

  • key: pubsub
    type: pubsub
    address:
    schema: http
    port: 8432
    host: pubsub
  • key: firestore
    type: firestore
    address:
    schema: http
    port: 8080
    host: firestore
  • key: es
    type: es
    address:
    schema: http
    port: 9200
    host: es
  • key: pgsql
    type: pgsql
    address:
    schema: pgsql
    port: 5432
    host: pgsql
  • key: redis
    type: redis
    address:
    schema: redis
    host: redis

But when you enter the main page and the interface itself in English.

Is it possible to add/enable custom localization in a docker container?

hi ! uk-UK is not the proper locale code, you may have to use uk-UA.

Okay, thank you, but what about Russian? I’ve tried setting the code to ru-RU, but it doesn’t change anything either

According to the source, the Russian locale is ru tao-portal/frontend/src/locale/ru/messages.po at main · tao-ce/tao-portal · GitHub. There are also a few variants like ru-EE, ru-KZ, …

Yes, you’re right. But I’m building a docker container, and there’s already a compiled translation, and I haven’t found any *.po files. Could you please tell me if it’s possible to add localization when creating a docker container?

I will follow up with developers and we will get back to you.

Thank you very much, I will be waiting. The question is very relevant.