berry-intl is a Berry binding library for GNU gettext.
It runs on GNU/Linux and requires Berry (>=0.1.10)
Authored by: Díaz Devera Víctor Diex Gamar (Máster Vitronic)
GPL license . See LICENSE.
See the Reference Manual.
$ git clone https://gitlab.com/vitronic/berry-intl.git
$ cd berry-intl
berry-intl$ make
berry-intl$ make install # or 'sudo make install' (Ubuntu)
#- Script: test.be
import intl; _ = intl.gettext
intl.setlocale("LC_ALL","");
intl.bindtextdomain("test", "./locales");
intl.textdomain("test");
print(_("Hello World"))
print(_("Good night"))
print(_("Amount"))
print(_("YES"))
The script can be executed at the shell prompt with the standard Berry interpreter:
$ LC_ALL=es_ES berry test.be
Hola Mondo
Buenas noches
Monto
SI
$ LC_ALL=fr_FR berry test.be
Bonjour le monde
Bonne nuit
Montant
OUI
$ LC_ALL=zh_CN berry test.be
你好,世界
晚上好
数额
是
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.