Translating the Ubersmith Interface Estimated Reading Time: 2 Minutes You can add a language translation that is not included by default in Ubersmith. In the instructions below, [locale name] is the correct locale for the language you are translating Ubersmith into, for example for French the locale would be fr_FR. Once you have configured your Ubersmith instance to use a new language, you will need to add and activate that language in the system interface. The default languages included with Ubersmith by default: American (en_US) and United Kingdom English (en_GB), Argentinian Spanish (es_AR), (French Canadian (fr_CA), Portuguese (pt_PT), Swedish (sv_SE), and Traditional Chinese (zh_TW) and Simplified Chinese (zh_CN). Copy the translation template by typing the following at the webroot command prompt. # mkdir -p /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES # cd /usr/local/ubersmith # docker cp ubersmith_web_1:/var/www/ubersmith_root/app/www/ubersmith.pot /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES/ubersmith.po Edit /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES/ubersmith.po, translating strings by replacing each empty msgstr string in ubersmith.po with the translated string. For example, to create a French (locale fr_FR) translation, use the following format. msgid "Welcome" msgstr "Bienvenue" Copy /[locale name] /LC_MESSAGES/ubersmith.po by typing the following into the Ubersmith webroot command prompt. Ubersmith will be briefly unavailable. # cd /usr/local/ubersmith # docker-compose rm -sf; ./ubersmith_start.sh Install the gettext package by typing the following into the Ubersmith webroot command prompt. # cd /usr/local/ubersmith # docker-compose exec --user root php apt-get update # docker-compose exec --user root php apt-get install gettext -y Use Ubersmith's update_translations.php script to use the [locale name]/LC_MESSAGES/ubersmith.po file to build the translation by typing the following into the Ubersmith webroot command prompt. # cd /usr/local/ubersmith # docker-compose exec php php /var/www/ubersmith_root/app/www/update_translations.php # docker cp ubersmith_web_1:/var/www/ubersmith_root/app/www/locale/[locale name] /LC_MESSAGES/ubersmith.mo /usr/local/ubersmith/app/custom/locale/[locale name] /LC_MESSAGES/ubersmith.mo # docker-compose exec web rm /var/www/ubersmith_root/app/www/locale/[locale name] /LC_MESSAGES/ubersmith.mo Create the file languages.ini in /usr/local/ubersmith/app/custom/locale/[locale name]. This file has the following format (in this example, we are using the fr_CA locale): language_name = "Français canadien"description = "Français canadien"name_convention = 0date_format = "Y-m-d" The name_convention variable determines how proper names are displayed in the system; using the name "John Smith" as an example:0: John Smith1: Smith John2: SmithJohn Recreate the Docker containers to copy the customized locale/[locale name]/LC_MESSAGES/ubersmith.{po,mo} files by typing the following into the Ubersmith webroot command prompt. Ubersmith will be briefly unavailable. # cd /usr/local/ubersmith # docker-compose rm -sf; ./ubersmith_start.sh Configure the new locale in Ubersmith. See Adding Languages for more information.