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 for translated player #35

Merged
merged 3 commits into from
Jan 4, 2018
Merged

Support for translated player #35

merged 3 commits into from
Jan 4, 2018

Conversation

matisojka
Copy link

@matisojka matisojka commented Dec 2, 2017

This allows to translate the texts that appear in the player.
I added the I18n class that detects the language following these rules:

If there is a locale key in the options of the player, this setting will always win, no matter what.
Otherwise, the locale will be detected by the browser.
If that fails, the locale falls back to en-US.

There are 2 supported locales right now, en-US and de-DE.

If the user uses a browser with the same language, but different country, eg. de-AT, then de-DE will be used, as it is the closest to the supported locales.

screen shot 2017-12-02 at 22 48 18

@matisojka matisojka requested a review from benzimmer December 2, 2017 21:46
@matisojka
Copy link
Author

Ping @benzimmer

@matisojka
Copy link
Author

Ping 2 @benzimmer

@benzimmer benzimmer merged commit 4f6417f into master Jan 4, 2018
@matisojka matisojka deleted the features/i18n branch January 7, 2018 11:59
benzimmer added a commit that referenced this pull request Apr 7, 2021
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

Successfully merging this pull request may close these issues.

2 participants