Skip to content

Conversation

filips123
Copy link

@filips123 filips123 commented Nov 21, 2018

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.

@sampotts
Copy link
Owner

sampotts commented Dec 8, 2018

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.

@filips123
Copy link
Author

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');
Copy link
Author

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'.

Copy link
Author

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.

@filips123
Copy link
Author

@sampotts Ping.

@garbinmarcelo
Copy link

any news? thank's

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.

4 participants