johndyer/mediaelement — pull request #940 by SergeyBiryukov (2013-07-13 02:25:32+00:00)
Title: More i18n fixes for compatibility with WordPress

68ce179cbd8a2426dfdeaffb1971c6783a858bd5 broke the i18n technique we used in WordPress (see #849).

When MediaElement.js tries to use `mejs.i18n.locale.strings`, the `mejs.i18n` object is already overwritten with the one that doesn't contain the strings we're trying to add. It also doesn't detect the language we're trying to pass. See http://core.trac.wordpress.org/ticket/24183#comment:8 for reference. I've also tried to set `mejs.i18n.locale` after ME.js is loaded, but that didn't work either, it appears to be too late.

SergeyBiryukov/mediaelement@875840d2f925765207d3edd32c5ccc6901e19358 offers two fixes to address the issue:

* Use a separate `mejsL10n` object to pass a translation as an array of
strings, to avoid conflicts with `mejs.i18n`.
* Make `getLanguage()` return just the language instead of the full locale
object.