i18n-node-2 icon indicating copy to clipboard operation
i18n-node-2 copied to clipboard

defaultLocale overridden by first language code

Open k2s opened this issue 10 years ago • 3 comments

configuration option defaultLocale is always overridden by first language code

var localeConfig = {
    langs: {
        'en': 'English',
        'sk': 'Slovak'
    },
    defaultLocale: 'sk'
};

i18n.expressBind(app, localeConfig);

value of req.i18n.defaultLocale will be set to en, it should be sk

k2s avatar Jan 22 '16 20:01 k2s

actually defaultLocale option is not working. it defaults to 'en' no matter what.

SeverS avatar Apr 11 '16 16:04 SeverS

I just recently encountered the same problem.

cjduncana avatar May 13 '16 05:05 cjduncana

I'll look into this when I have some time

gjuchault avatar May 19 '16 21:05 gjuchault