cardscript icon indicating copy to clipboard operation
cardscript copied to clipboard

i18n

Open nothingismagick opened this issue 7 years ago • 2 comments
trafficstars

I couldn't find a recommended approach to integrating i18n strings and having them rendered. Is this something that you can advise on - or should I look into providing a PR?

nothingismagick avatar Oct 07 '18 08:10 nothingismagick

Hi @nothingismagick .... thanks for this.

We've no urgent need for i18n right at the moment... but this idea does open-up a lot of opportunities. Not sure we can do much just now, so we'd love some input or a PR. Thank you!

timneedham avatar Oct 12 '18 17:10 timneedham

So I guess there might be several ways to do this. One abstract method would be to craft a cardscript-to-i18n package, which would have the advantage of being “presentation” agnostic, with the disadvantage that it would require a lot of dedicated work to create a standalone system for locales, plurals, currencies etc. Another approach would be to rig quasar explicitly with i18n support from the get go. This would slightly increase the dist package size, but I think that would be bearable because of quasar’s tree shaking. A final idea would be to create a cardscript scoping object at the top level of the json that informs renderers about the expectation of a non-English interface or even multiple languages (and potentially where to find the assets to lazy load...) Of course a language switching component would also be necessary...

So, before a PR makes sense, I think some discussion about approach would be paramount.

nothingismagick avatar Dec 24 '18 15:12 nothingismagick