Closed DRFR0ST closed 3 years ago
Hi! I've finished working on the support for array translations. These will allow passing multiple translations and avoid using incremented key naming (eg. greeting01, greeting02, greeting03).
greeting01
greeting02
greeting03
An example of translations:
const translations = { greetings: [ { pl_PL: "Dzień dobry", en_US: "Good morning", de_DE: "Guten Morgen" }, { pl_PL: "Cześć", en_US: "Hello", de_DE: "Hallo" }, ] } const translated = translate(translations, "en_US"); translated.slogans[1] // => "Hello"
I've also added some unit tests but it still needs some real testing.
Hi! I've finished working on the support for array translations. These will allow passing multiple translations and avoid using incremented key naming (eg.
greeting01
,greeting02
,greeting03
).An example of translations:
I've also added some unit tests but it still needs some real testing.