3 ms·
I18n Module for Node and Express.js
- sksksk 14y agoWhile this looks pretty cool, having just gone through a huge i18n project at my company, there are a few things I'd like to see in a production ready i18n platform... 1) Plurals 2) Productisation: If you go into a different country, and you have give you product a different name, you would want to support that new name in all locales. For example, if in the UK your product is called A and in Germany it's called B. Then when you visit the UK site in the German locale, it should call the product "A" 3) Currency formatting If you are a US user, who visits a page which is showing Canadian prices, you'll want it to say something like CAD$10. Different Eurozone countries have different ways of displaying currency (€10/10€) 4) Distance formatting 5) Time and Date formatting 4) An i18n strategy for images 5) This gets more into localisation rather than i18n, but localising images can be difficult (if you have a car, then you would want the correct number plate or you'd want the steering wheel to be on the correct side of the car) 6) Support for different "voice" in different countries. Countries respond differently to different voices (people in the US might like a more casual tone, wheras people in another country might respond better to a more matter of fact language)
- jeresig 14y agoI don't envy having to work on something of that scale! At least for my particular case, the only item in that list I needed to worry about was plurals (which I have with the __n method). (And thankfully there are other good JS libraries for currency and time/date formatting that I can use.) I recommended people look at Jed.js and messageformat.js for some of the more complex cases, thankfully I haven't had to go down that road yet!
- jcampbell1 14y agoOne thing that has always bitten me, is stuff like: Go to the <a href=/settings>account settings</a> page to change your username. It is tricky, because you can't just extract three strings, and if you extract the full text, then you have urls and html in the translation files. I have done stuff like ||link|| and ||end_link||, which works okay, but you also need a tool to make sure the translations have matching components.
- camus 14y agoagain , very interesting work , thanks John.
- SeoxyS 14y agoI don't understand why people can't just spell out the word "localization" instead of relying on what must be the worst abbreviation ever invented. (l18n)
- binarycrusader 14y agoBecause internationalization and localization are not the same thing and they're really long words :-) http://en.wikipedia.org/wiki/Internationalization_and_localization