live2d-widget icon indicating copy to clipboard operation
live2d-widget copied to clipboard

Add i18n support.

Open nonsoft-dev opened this issue 4 years ago • 5 comments

Hi there.

Please forgive me writing this issue in English, my Chinese isn't very well.

I was super interested in this project and wanted to have i18n - multiple languages support. I have made a fork of this project to support those who needs to add language of your own.

https://github.com/nonsoft-dev/live2d-widget-i18n

The idea is to swap the waifu language in real-time.

image

This requires i18n-js dependency and I have modified quite a bit of codes without proper testing. Therefore, I'll not make a pull request to add in but I think it's great to share for those who're looking for the same thing as me :).

Thank you for such an awesome widget :confetti_ball: :confetti_ball:.

Keep up with the great work!

nonsoft-dev avatar Dec 17 '20 14:12 nonsoft-dev

Great!

zhanghexiangcn avatar Jan 13 '21 08:01 zhanghexiangcn

this is a great idea. @nonsoft-dev why don't you make a pull request? I wonder if you can open a pull request here in my repo https://github.com/KnowsCount/qiokian (the same thing but a vue component) too... It would be fabulous if you can! If you cannot due to reasons, may I personally merge it into my repo?

KnowsCount avatar Feb 12 '21 17:02 KnowsCount

@KnowsCount Thank you. Sorry I wasn't able to check Github recently. I didn't make a pull request because I just feel like it will add extra unnecessary dependencies to this project.

Please feel free to merge in with your repo :).

nonsoft-dev avatar Mar 11 '21 07:03 nonsoft-dev

Sorry for the late reply, I have been very busy in the past few months.

I didn't expect this project to become so popular at first, so I didn't design enough API to ensure the extensibility of the plugin.

Now I am considering redesigning some APIs so that even users who are not proficient in javascript can customize more content, including i18n and more functional buttons (e.g. #64).

This may take some time and bring breaking changes that are not backward compatible.

If you have better suggestions, you can also reply in this issue. Thanks 😊

stevenjoezhang avatar Mar 11 '21 09:03 stevenjoezhang

I have recently made some refactors so that you could easily customize almost all the text in waifu-tips.json, without modifying waifu-tips.js

This should make the translation a little easier, and the i18n support can be implemented by keeping multilingual versions of waifu-tips.json in this repository.

stevenjoezhang avatar Oct 20 '22 15:10 stevenjoezhang