Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide compatability shim to i18n #4

Open
alerque opened this issue Sep 13, 2019 · 0 comments
Open

Provide compatability shim to i18n #4

alerque opened this issue Sep 13, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@alerque
Copy link
Owner

alerque commented Sep 13, 2019

The i18n.lua project has a fairly mature localization implementation all on it's own. The Lua API works like most other gettext() interfaces to date. It isn't nearly as flexible as Fluent but it's on par with most other systems. Most interesting to this feature suggestion is how widely adopted it is already.

One thing we could probably do is provide a shim module (as a sub-module) not included by default but that would return a compatible interface. The backend would load data from *.ftl sources per our Fluent syntax parser, build an AST as normal, then pare it down to just the parts that the i18n module will understand and populate it as a data set, then let people query it through i18n as usual.

Only the way the populated their data would have to change out of the gate so migration would be easy. Code could be updated to use the Fluent interface on an ad-hoc basis.

@alerque alerque added the enhancement New feature or request label Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant