Сравнение версий
по сравнению с
Ключ
- Эта строка добавлена.
- Эта строка удалена.
- Изменено форматирование.
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 - 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.
| панель | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
On this page:
|
| Свойства страницы | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
|