i18N in beard
Closed this issue · 2 comments
Since filters will be part of the language, one could also investigate i18n as a feature.
Regarding AngularJS (since we borrowed the syntax for filters from there), we could also implement i18n according to a very common AngularJS filter called "translate".
What happens is, that the used locale is provided in the global context of the renderer. A JSON-object mapping locales to sets of keys for localized messages is provided. By passing the message keys to the according filter, the localized messages/strings are resolved.
Here is the repository of the mentioned translation filter: https://github.com/angular-translate/angular-translate.
Hello @rweyand,
Can you please give an example on how this feature will look in Beard? It would be easier to imagine it, if you could show how a template will look like and how the code which will call the template as well.
Before that I'll close this ticket. Feel free to reopen it, as soon as you have an example.
Thanks