September 5, 2020

Change Language Open edX

Activities, Android Developer, Ansible, Apache2, Atlassian, Ayo Belajar Linux, Bestpath Network, BLC Telkom Klaten, BSD, Caddy Server, Case Study, Cisco, Cisco Indonesia, Cloud Computing, Cockpit, Custom Weapons, Docker, E-Learning, Engenius, Error, FreeBSD, FreeBSD Indonesia, Komunitas Pengguna Linux Indonesia, KPLI Bulukumba, KPLI Klaten, Lets Encrypt, Linux, MacOS, Microsoft Azure, Microsoft SQL Server, MikroTik, MikroTik Indonesia, MySQL, Nginx, Open edX, OpenSID, Others, PHP, phpMyAdmin, PostgreSQL, Proxmox, Python, Redash, Sendy, SSH, Stories, Subnetting, TP-Link, Ubiquiti, Unix, Virtualization, Windows, X-Mosque, Faizar Septiawan, Icar, siBunglonGanteng, Orang Ganteng, siBunglonLabs, Programmer, SysAdmin, Site Reliability Engineer, Developer, Palugada, Makassar, Ganteng, Gila, Cyclist, Panglima, Setan, Panglima Setan, sibunglon, Ganteng

Open edX uses Transifex, an open source translation platform, to power the translation of edX software into different languages. All translations are hosted at Transifex.com, which provides a web application allowing translators to write, submit, and manage their translations.

  1. Login to server and switch to edxapp environment for edX native installation.

    $ sudo -H -u edxapp bash
    $ source /edx/app/edxapp/edxapp_env
    $ cd /edx/app/edxapp/edx-platform
    
  2. Install Python dependencies

    $ pip install transifex-client
    

    or when using bitnami, use this

    $ sudo /opt/bitnami/apps/edx/bin/pip.edxapp install transifex-client
    
  3. Create the ~/.transifexrc file and set your credentials as follows:

    [https://www.transifex.com]
    hostname = https://www.transifex.com
    username = USER
    password = PASS
    token =
    

Token is left blank. You have to have permissions for the project (edx-platform) AFAIK - https://www.transifex.com/projects/p/edx-platform/ (it is free to sign up and join this project as a translator).

  1. Make sure all languages you wish to download are present and uncommented in conf/locale/config.yaml. For example, if you wish to download Arabic and Indonesian, make sure your config.yaml file looks like this:

    locales:
         - en  # English - Source Language
         - id  # Indonesian
    
  1. Set the value of the LANGUAGE_CODE variable to the language you desire in the configuration files.

    For Open edX native installation

    • /edx/app/edxapp/lms.env.json
    • /edx/app/edxapp/cms.env.json
    • /edx/app/edxapp/edx-platform/lms/envs/common.py

    For Open edX on bitnami

    • /opt/bitnami/apps/edx/conf/cms.env.json
    • /opt/bitnami/apps/edx/conf/lms.env.json
    • /opt/bitnami/apps/edx/edx-platform/lms/envs/common.py
  1. Restart lms and cms for reload configuration.

  2. Download the translations, extract and compile.

For edX native installation

$ paver i18n_robot_pull --settings=production

For edX on bitnami

$ cd /opt/bitnami/apps/edx/edx-platform
$ sudo /opt/bitnami/apps/edx/bin/paver.edxapp i18n_robot_pull
  1. Restart lms and cms for reload configuration.

Update Localization

  1. Edit the contents of .po files located in conf/locale/<lang_code>/LC_MESSAGES as you wish. When you finished your modification process, re-compile the translation messages manually by executing the following command in your edx-platform directory with your edx-platform virtualenv

    $ paver i18n_fastgenerate
    
  2. Restart lms and cms.

References