You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested to contribute in order to offer some sort of localization of the inflexions.
Before going to add a particular language.
I wanted to discuss for the "architecture" of handling the configuration of the locale setting.
I see three ways to do it internally with both a global default and an option to do it per function.
But in any case, this needs to have all the inflexions mechanisms (I mean all the string manipulation and matching functions) separated from all the language related rules and data.
Using the Elixir Config module and setting a locale config value (eg. "en", "fr", etc.)
Using an optional key-value parameter (eg. locale: "fr") in each function
Using a dedicated function that can be invoked at any time to set the locale from that moment on (not fan of that, but it's a possibility)
Another option could be to handle the localization setting itself outside with for example ex_cldr. This needs an extra dependency, but it's possible to add it for those already using a package already using it (like ex_money).
But in this case all the language related rules and data should still be done internally.
Again it's necessary in any case to separate the string manipulation mechanisms with the language data rules themselves.
In this situation, it can be even possible to separate all the data as a separate package (or not).
What do you think?
The text was updated successfully, but these errors were encountered:
Hi,
I'm interested to contribute in order to offer some sort of localization of the inflexions.
Before going to add a particular language.
I wanted to discuss for the "architecture" of handling the configuration of the locale setting.
I see three ways to do it internally with both a global default and an option to do it per function.
But in any case, this needs to have all the inflexions mechanisms (I mean all the string manipulation and matching functions) separated from all the language related rules and data.
Config
module and setting alocale
config value (eg. "en", "fr", etc.)locale: "fr"
) in each functionAnother option could be to handle the localization setting itself outside with for example
ex_cldr
. This needs an extra dependency, but it's possible to add it for those already using a package already using it (likeex_money
).But in this case all the language related rules and data should still be done internally.
Again it's necessary in any case to separate the string manipulation mechanisms with the language data rules themselves.
In this situation, it can be even possible to separate all the data as a separate package (or not).
What do you think?
The text was updated successfully, but these errors were encountered: