Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Japanese translation #80

Open
suzuuuuu09 opened this issue Aug 27, 2024 · 5 comments
Open

Add Japanese translation #80

suzuuuuu09 opened this issue Aug 27, 2024 · 5 comments

Comments

@suzuuuuu09
Copy link

I am working on the translation into Japanese.
Along with that, I have created more accurate README-JP.md and jp.json, edited LanguageSelector.tsx, i18n.ts and i18nCache.ts and finished all work.

スクリーンショット 2024-08-27 220705

However, as shown in the picture above, the place where it should be displayed as Japanese is displayed as Jp.
How can I display Japanese?

@Specy
Copy link
Owner

Specy commented Aug 27, 2024

Look here:

This map is what will be shown in the language selector option.

Thank you for the Japanese translation!

@Specy
Copy link
Owner

Specy commented Aug 27, 2024

Ah I just checked, Intl.DisplayNames is used by default to translate the name of the language to the default locale of the device, and for unsupported browsers it defaults to the language map

@Specy
Copy link
Owner

Specy commented Aug 27, 2024

Ok so, apparently the Japanese locale is ja not jp

const name = new Intl.DisplayNames("ja", { type: 'language' });
console.log(name.of('ja'));

Shows the correct result. You just need to change the locale name from "jp" to "ja" and it should work

@suzuuuuu09
Copy link
Author

スクリーンショット 2024-08-27 231454
I have confirmed that it is displayed. thx!

suzuuuuu09 added a commit to suzuuuuu09/genshin-music that referenced this issue Aug 27, 2024
@cangerjun
Copy link
Contributor

@suzuuuuu09 Oh, you're doing it too fast! ああ、あなたのするスピードは速すぎます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants