Hey I'm currently creating an application (https://github.com/GlenDC/trixel) in Elm, and as the language is quite young, I now and then end up having to create a missing library. I was looking into localization and found l20n.js. Which looks awesome and I made a first library for elm, wrapping l20n here: https://github.com/GlenDC/elm-l20n
I'm however not very happy with it, as it's not really what I would want to use as a user in elm. Right now I was just using the html data-l10n attributes and allowing l20n to do the job in the default straightforward way. However I would like to decouple it more and instead focus more on making it possible for users to do simple actions, such as: - Given a list of id's or a single id, translate using the current language - Changing the language, to use a language other than the browser-specifid language I saw the Javascript option and so I think it's possible, however I have some questions. - Is it still efficient enough to for example translate 100's of id's seperatly, via different calls (i'm assumining yes, as l20n just seems to be translating all the nodes it can find anyhow, in a very similar way) - The biggest problem i right now have, is how to couple it's asynchronous nature into an Elm environment. I do understand why it's asynchronous and I support it, It just makes me quite puzzled how to tie it into my use-cases. Were there previous attempts by people, to use l20n in a pure javascript way, without having any DOM involvement? with kind regards _______________________________________________ tools-l10n mailing list [email protected] https://lists.mozilla.org/listinfo/tools-l10n
