pjeby / tag-wrangler

Rename, merge, toggle, and search tags from the Obsidian tag pane
603 stars 18 forks source link

Add language localization for menu. #87

Open yslin1995 opened 1 year ago

yslin1995 commented 1 year ago

Will the plugin be adapted to more languages like Chinese, Japanese and more?

pjeby commented 1 year ago

Someone would need to contribute the code (not to mention any translations).

mariomui commented 1 year ago

i can do chinese. But i think there needs to be an arch talk about translation strategy. https://www.i18next.com/ https://airbnb.io/polyglot.js/

I don't know what exactly entails a chinese translation of the plugin other than the text stuff. I think there's a usability problem with auto detecting the language for translation--just cuz i'm on a a chinese computer doesn't mean I want to take notes in chinese, and vice versa.

pjeby commented 1 year ago

Obsidian uses i18next and has a language setting that plugins can use. See other plugins with translations for details on how that works.

mariomui commented 1 year ago

I did a small implementation of i18n based off some research. I used the globalthis.i18n as the typing in @ophidian/core suggested. https://github.com/pjeby/tag-wrangler/pull/100