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

Support standard language code? #530

Closed
Mister-Hope opened this issue May 5, 2023 · 3 comments
Closed

Support standard language code? #530

Mister-Hope opened this issue May 5, 2023 · 3 comments

Comments

@Mister-Hope
Copy link

Mister-Hope commented May 5, 2023

When creating a component wrapper of artplayer, it would be better to know what key (lang/langCode) is supported by artplayer, so maybe a values languages or some thing similar could be added as a method for I18n Class?

https://github.com/zhw2590582/ArtPlayer/blob/master/packages/artplayer/src/i18n/index.js

Oh sorry just realized we have languages.

Can artplayer support standard language code as https://en.wikipedia.org/wiki/ISO_639 and https://en.wikipedia.org/wiki/ISO_3166 describes.

Thie means standard lang code like en-US, zh-CN, ru-RU should be supported.

@Mister-Hope

This comment was marked as outdated.

@Mister-Hope Mister-Hope changed the title Expose supported language Support standard language code? May 5, 2023
@Mister-Hope
Copy link
Author

@zhw2590582
Copy link
Owner

Now using navigator.language.toLowerCase() to get the language code. I am not sure if this is standard, but I think this is enough for most cases

@zhw2590582 zhw2590582 closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
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

2 participants