Marcus Spiegel

Results 138 comments of Marcus Spiegel

well fallbacks are in for a while now, see https://github.com/mashpie/i18n-node/blob/master/test/i18n.fallbacks.js and https://github.com/mashpie/i18n-node#list-of-all-configuration-options anything still missing for you?

Let's try to sum up a little: So you are trying to achieve a "partial" translation, right? The only intended "fallback" is the key itself. `__('Hi Dear')` will put "Hi...

How could we live without fallbacks for so many years?! In short: i18n is about "translate on phrase to mutliple languages" while l10n is responsible to deliver one translation to...

doesn't that config option do the trick? ``` // will return translation from defaultLocale in case current locale doesn't provide it retryInDefaultLocale: false, ``` while talking about `env var lang`......

of course it should be set to `true` - setLocale does not change `defaultLocale`. setLocale sets the `locale` on the registered object, see https://github.com/mashpie/i18n-node#some-words-on-register-option and https://github.com/mashpie/i18n-node/blob/master/test/i18n.setLocale.js

Briefly looking at your repository it seams, that you are using a global singleton for both: cli and web requests. And I can't find any `configure()` at all, which means...

Ok, registers to global. So setLocale should work for that Single process. Same as __() I was looking at Server.ts and commands... https://github.com/kaaaxcreators/Discord-MusicBot/blob/824527b00dc96d514c93db81b4e681bf7101a972/src/server.ts Importing i18n module won’t ensure it‘s configured...

Hi @doneumark! I'm afraid that such a feature currently doesn't exist. But you might consider setting a special "direction-key" within your language files to come around that, for example: ```json...

While I get your use case, you should not run production server with `autoLoad` enabled. Instead use public method `i18n.addLocale(locale)` (https://github.com/mashpie/i18n-node/blob/master/i18n.js#L519) to programmatically re-read your locales from storage. Still any...

right. ```js fs.writeFile('/locals/en.json', JSON.stringify(translations), () => { i18n.addLocale('en') // res.redirect('/some/url') ## whatever it takes in your use case }) ``` more details in #168 and #169