character-sheet-app icon indicating copy to clipboard operation
character-sheet-app copied to clipboard

Add support for internationalization (i18n)

Open baldurmen opened this issue 5 years ago • 4 comments

Hey!

Thanks for this project, it's super nice and I really like the 'offline' design.

Do you think it would be possible to add support for internationalization (i18n)? I know people who play in other languages than English and would like to be able to use this in their own language.

I'd be happy to help out with this and I can provide a French translation! I'm just not sure how you'd want to design this, so some pointers would be helpful.

baldurmen avatar Dec 30 '19 00:12 baldurmen

hi @baldurmen. Thanks for the PRs will check them out when I get a chance.

Yesh i18n is a good idea. I've actually got that on the todo list for my job/work code, so it'd be a good thing to figure out for this project where it's a rather manageable amount of text. I'll look into it and how it might be best handled.

derikb avatar Dec 30 '19 16:12 derikb

This looks like a fairly simple library https://airbnb.io/polyglot.js/

derikb avatar Dec 30 '19 23:12 derikb

Downside of polyglot is it's not module enabled and uses require statements, which means there'd have to be some kind of build process to get it to work with the current module based code.

derikb avatar Jan 11 '20 19:01 derikb

Probably the best option: https://www.i18next.com/

derikb avatar Feb 26 '22 18:02 derikb