Closed gausby closed 10 years ago
I'm glad people are using that :)
@gausby Are you using express-negotiator to serve the localized html in production?
At the time being I'm just researching the possibility to localise an application I'm about to build for a client, so I haven't thought about how to serve the end product.
Looks cool though. I am definitely going to check it out!
It also works with Apache's mod_negotiation
and NGINX's try_files
directive. Basically anything that'll look at the Accept-Language
header and pick the best match among a set of files on disc named foo.<localeId>.html
. In addition to that, express-negotiator
supports a language cookie that takes precedence over Accept-Language
.
At One.com we use AssetGraph-builder's i18n features for localizing 4 major knockout.js web apps and an Ext.js one, and even some standalone web pages. The only thing about it I'd urgently like to change is the buildDevelopment
requirement when when the translations need to work in the development setup.
Let me know if you need any assistance.
I forgot all about this one. I'll merge it in, but make a change so the locales
is an array of strings instead of a comma separated string that has to be split. I think verbosity will actually be more helpful to avoid configuration errors
Published in grunt-reduce v0.2.0
Add
locales: 'en,da'
to the grunt reduce configuration. This will make asset graph build an english and danish version. Read the section about internationalization in the asset graph builder documentation for more info.