roddeh / i18njs

Internationalisation library for JS projects
MIT License
64 stars 17 forks source link

Method extend does not exist on return value of i18n.create #24

Closed ogallagher closed 6 months ago

ogallagher commented 6 months ago

I'm using i18n as a frontend dependency using legacy syntax (load into global scope as i18n).

When I run

let translator = i18n.create({values: {k1: 'v1'}})
translator.extend((a, b, c, d) => {return 'example extension'}) // fails here

I see

TypeError: translator.extend is not a function

So it appears that the extension syntax as documented will not work.