-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add support for central translation repository #1269
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
base: develop
Are you sure you want to change the base?
Conversation
Perhaps we just create a build task that accepts an argument for an ISO code and bundles that lang (if it exists) with the rest of the JS. |
Unfortunately I can't create custom build tasks because I (currently) don't know much about Node.js build systems and Gulp. |
return ''; | ||
} | ||
|
||
const english = languages.filter(e => e.code === 'en'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From #1269 (review):
Also should we not use a config option for the default? It may not always be 'en'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default language should be en
because it is only for times, when translation doesn't have some translated strings, so like fallback language.
But maybe there could be support to change fallback language.
@sampotts Ping. |
any news? thank's |
It adds support for central translation repository and fixes #1261.
Translations are saved into
src/locales/{lang}.js
(where{lang}
is IETF BCP 47 language tag) and bundled to Plyr file.Language could be specified with
language
options and it could not be changes by user (for now).Translation could still be overwritten by
i18n
option.In the future, you should add support for user changing of language in UI options. I've already added language name field for this (in
src/locales/index.js
). See #1270.You should also find translators to add translations. I added translation guide to
contributing.md
and I could translate UI to Slovenian.