#674 ✓ staged

Providing language selection to all plugins

Reported by brianchirls | August 2nd, 2011 @ 03:26 PM | in 0.8 (closed)

As discussed on the July 26, 2011 conference call...

We should encourage and enable all plugin authors to accommodate users' language preferences, beyond subtitles. Where possible plugins should use this information to localize any interface (labels and stuff) as well as customizing content. (e.g., a wikipedia plugin might select from: http://en.wikipedia.org/wiki/NATO or http://fr.wikipedia.org/wiki/NATO or http://ja.wikipedia.org/wiki/NATO )

Popcorn core should provide methods to set and retrieve these preferences. Popcorn should make an attempt to detect the language, first from the browser and second from the web page. Detected preferences should be overridden by a .language() call (or something like it).

It's worth looking at the HTTP Accept-Language header, which offers a list of acceptable languages in order of priority.

This will also be a nice way to get away from the subtitle plugin's dependency on an existing element, which is weak. As it stands, if two different plugins wanted to know the user's language, they would need to come up with two different ways to get it, possibly require the user to answer the question twice.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Popcorn.js is an HTML5 video framework that lets you bring elements of the web into your videos.

Popcorn.js is a project of Web Made Movies, Mozilla's Open Video Lab.

Shared Ticket Bins