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

Internationalization (i18n) support #663

Closed
matthiaslorin opened this issue Jul 30, 2013 · 12 comments
Closed

Internationalization (i18n) support #663

matthiaslorin opened this issue Jul 30, 2013 · 12 comments

Comments

@matthiaslorin
Copy link

Support replacing all english strings (captions menus, ARIA, etc.) with other languages.

The first step will be to store all english strings in variables.
We should also store all the language translations in a separate plugin so they don't add a ton of weight to the player.

ORIGINAL MESSAGE
Subject: Translating??
Hello.

I am french and the player isn't french, well i've tried to navigate over the code I wanted to translate like the "captions off" text to french.

And they seem to be no solutions.

Anybody has one?

@heff
Copy link
Member

heff commented Jul 31, 2013

No solution for internationalization yet. It probably wouldn't be too hard to pull out all the english text into variables that can be overridden in vjs.options, if you want to make a try at it.

@heff
Copy link
Member

heff commented Mar 4, 2014

Updated description and confirming as an enhancement.

@dmlap
Copy link
Member

dmlap commented Jul 7, 2014

@heff, @seniorflexdeveloper and I did some thinking about how to add this capability to video.js and make it relatively easy for plugins to piggy-back their custom messages into the framework. The solution we're proposing has three parts:

  • Add an object to window.videojs to contain dictionaries of localized messages for each language
  • Update the build process so that custom builds can be created that include specific language sets
  • Modify videojs.Component so that is uses the appropriate language dictionary when initializing a component

This won't support switching languages at runtime but it should mean that video.js + support for one language has the same runtime cost (download size, text rendering) as the current distribution does. I captured some of the discussion in a gist that may or may not be comprehensible. @seniorflexdeveloper volunteered to take a stab at it and open a PR.

@ghost
Copy link

ghost commented Jul 17, 2014

I'm willing to translate the strings in French when a localization system is done.

Couldn't it just be something like

-original EN file:

{
"player": "player"
"mute": "mute"
}

-Translated file:

{
"player": "lecteur"
"mute": "muet"
}

That's what I use combined with i18n. Easy and really light

@heff
Copy link
Member

heff commented Aug 2, 2014

@ghost Thanks for the offer! This in progress if you want to start translating some of the text we have in #1360

@philipgiuliani
Copy link
Contributor

I could offer an Italian and German translation :) i also would need the translation method for a plugin im currently writing!

@gkatsev gkatsev removed the unclaimed label Sep 17, 2014
@gkatsev
Copy link
Member

gkatsev commented Sep 17, 2014

@philipgiuliani that would be awesome.

@gkatsev
Copy link
Member

gkatsev commented Sep 17, 2014

@heff would this be considered finished? Not sure what is left for this.

@philipgiuliani
Copy link
Contributor

I will take a look tomorrow. Is there already an API to use it in custom plugins?

@gkatsev
Copy link
Member

gkatsev commented Sep 17, 2014

@tomjohnson916
Copy link
Contributor

@philipgiuliani - The link @gkatsev referred to is out of date. There is a new implementation using a custom grunt plugin. A better example of this would be to review our errors plugin at https://github.com/brightcove/videojs-errors/, which uses the current way.

@philipgiuliani
Copy link
Contributor

Cool solution :) Thanks for your help! @gkatsev @seniorflexdeveloper

@mmcc
Copy link
Member

mmcc commented Sep 18, 2014

Sounds like we're all good here? I'm going to go ahead and close this one, but feel free to yell at me if I'm wrong and I'll reopen.

@philipgiuliani looking forward to the Italian and German translations!

@mmcc mmcc closed this as completed Sep 18, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants