-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Internationalization (i18n) #12
Comments
I'm not quite sure that i18n logic branching should belong in the templates. For one, I find that i18n is always pretty opinionated (are you using English strings as keys for translation, or are you using quasi variable names like It's also horribly difficult to make templates like that that are generic enough to fit all languages and grammars correctly. Case in point: the project you just linked (at first glance, I might be wrong) assumes that you can use the same grammar for all plural forms of enumeration. That's true in English (4 apples; 5 apples; 42 apples; 100 apples), but is not true in my native Polish (4 jabłka; 5 jabłek; 42 jabłka; 100 jabłek). Not to make a jab, as this simple thing trips over almost every i18n library/framework that is not written by someone who is a linguist, or for this specific case, at least familiar with some slavic language. I'm not a linguist, I don't even know what I don't know about a lot of grammars (except for German, I'm aware of a lot of German grammar that I'm wilfully ignorant of :D), so I think delegating the work of internationalization to a 3rd party library authors is probably the safest bet. Also Ramhorns is mostly intended to be a logic-less template :). |
Yeah….german is a grammar bitch ^^ I'm also ignoring a lot of the "High" german grammar. I can't tell you much about the polish plural, but did you scroll down the starting page of Project Fluent? I think they are especially empathising about the different plural forms. |
Ah, so they do handle it, that's pretty neat, I really only glanced at it :P. I'll think on this a bit more. |
Doing some feature pruning in general. It seems we are leaning into making Ramhorns a compliant mustache implementation, and I think it might be a good idea to stick to unix philosophy here. Plus I really don't see myself finding time to do this :). |
As an idea for a future feature, i think internationalization would be really great and useful to a lot of people.
For doing this i would suggest using Project Fluent, which even has a Rust Crate fluent-rs.
The text was updated successfully, but these errors were encountered: