You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
erl | 2 years ago | |
syntax | 2 years ago | |
tools | 2 years ago | |
license | 2 years ago | |
locale.lua | 2 years ago | |
readme.org | 2 years ago |
readme.org
Er2 Locale
Originally it was a part of ErTK (under development), but I decide to open source to other repository.
Currently there is only Lua implementation, but you can port to other language.
Syntax
Localization files is using it's own format (see syntax/example.els
).
Also you can see at the erl
directory.
Editor support
Syntax highlighting available only in micro
editor
(syntax
directory)
Tools
Except runtime we have 2 tools:
compile.lua
- Compiles els to one (prog. language specific!) filepo2els.lua
- If you want to migrate from gettext or if translation program/service cannot export to els yet
Example
require('locale') 'erl' -- init and load erl folder
_.locale = 'ru' -- set locale will be used, maybe create $LANG detect
_("My string") -- basic usage
_ "My string" -- without (), lua feature
_("My string", {plural = 1}) -- print plural form, maybe create other function for this