Localizing Players

Product
Video Cloud
Applies to Roles
Developer
Version
Brightcove 5
Modules
BEML
Edition
Pro, Enterprise

Label texts in Video Cloud players are specified in label elements in a player template. This enables you to easily customize the texts of all the labels visible to your viewers.

You can customize label texts to localize a player for a particular language, or just because you want your play button to say "Go!" instead of "Play." There are at least three approaches you can take to customizing the labels:

The Labels element in a player template can contain both the path to an XML file to be loaded or individual overrides of labels for a player. You can override these labels to localize or otherwise change the default text displayed in the players.

Note: If you modify labels in a player template, be sure to preview the modified player to make sure that the labels still fit within the player layout. If your customized labels are significantly longer than the default labels, they may no longer fit and might be truncated in display or prevent other player components from rendering correctly. If that happens, you may need either to re-word your custom label or make other modifications to the player layout to make the label fit. We currently support player labels for left-to-right languages.

Selecting a standard language label set

All standard Video Cloud players can use one of the standard language label sets. The languages available in this release are English, French, German, Italian, Japanese, and Spanish. You can select the language for a player's labels using the Language Options settings in the Publishing module, as described in Editing Settings for Players: Language Options.

You can also set the language option by modifying the configuration parameters in the player's publishing code. You can set the language configuration parameter to one of en (English), fr (French), de (German), it (Italian), jp (Japanese), or es (Spanish). For example, to set a player's labels to French in the JavaScript player publishing code, include this configuration parameter:

<param name="language" value="fr" />

Read more about player configuration parameters.

You can access the English language label file at http://support.brightcove.com/en/docs/label-set-file-example and can access each of these standard language label files at http://admin.brightcove.com/L10n/players/:

Extended language set

In addition to the six languages you can select in the Language Options setting of the Publishing module, Video Cloud makes available player label files for many additional languages.

To use this extended language set for your players:

  1. Download the language label file for the language you want to use. Or download a zip file that includes all of the language label files.
  2. Host the language label file on your server.
  3. Configure your players to point to the language label file, using one of the methods described in the Overriding a label set with a label XML file section below.

While these language label files have the appropriate translations, they may not be a good fit in standard player templates, especially for those languages that use non-Latin (and especially right-to-left) characters. Make sure you preview your players before you publish them, to make sure the labels fit and are legible. In some cases, you may need to create a custom player template using BEML with larger label sizes.

At present, the Video Cloud extended language set includes the following language options. Download a zip file that includes language label files for all of them, or click the language name to download a zip file that contains the language label file for that language.

locale code language
ar Arabic*
cs-CZ Czech
da-DK Danish
el-GR Greek
fi-FI Finnish
he-IL Hebrew*
hi-IN Hindi
hu-HU Hungarian
ko-KR Korean
ms Malaysian
nb-NO Norwegian (Bokmål)
nl-NL Dutch
pl-PL Polish
pt-PT Portuguese (Portugal)
ro-RO Romanian
sk-SK Slovak
sv-SE Swedish
th-TH Thai
tr-TR Turkish
vi-VN Vietnamese
zh-Hans Chinese (simplified)
zh-Hant Chinese (traditional)

* Note that Arabic and Hebrew, as right-to-left languages, may pose formatting problems in standard player templates. Consider creating a custom player template that accommodates right-to-left language labels.

Overriding a label set with a label XML file

To override any or all of the labels in a player template:

  1. Create a label set XML file that defines new texts for the labels that you want to override.
  2. Use the file attribute in the Labels element to point to the URL of the label set XML file. For example:
<Labels  file="http://server/labels.xml" />

Or, use the Language Options settings in the Publishing module to point to the URL of the label set XML file.

As a third alternative, you can use a player configuration parameter in the player's publishing code to point to the URL of the label set XML. For example, in your JavaScript player publishing code, include a configuration parameter like this:

<param name="labels" value="http://server/labels.xml" />

Bear in mind the Flash security constraints that limit a player's ability to interact with other domains. The domain that hosts your label set XML file needs to include <allow-access-from domain="admin.brightcove.com" /> in its crossdomain.xml file.

The string "share twitter message" ends up as a URL parameter, and Twitter requires this to be URL encoded (see https://dev.twitter.com/docs/intents). Our player does not URL encode this string, so it must be encoded within the labels file:
<label key="share twitter message">V%C3%AA+isto+</label>,
and not
<label key="share twitter message">Vê+isto+</label>
Otherwise when clicking on the Twitter share icon, this error is returned by Twitter:
Invalid Unicode value in one or more parameters /intent/tweet?status=V%EA+isto+http%3A//bcove.me/hr4r1t6y

Creating a label set XML file

A label set file is a simple XML file that has just two kinds of elements:

  • the labels container element
  • one or more label elements

The container element looks like this:

<Labels xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Within the labels container element are one or more label elements, which have this structure:

<label key="label name">Label Text</label> 

Use one label element for each label you want to override. You need to include label elements only for the particular labels you want to override. Any other labels will retain their default values. Here is an example of a label set XML file. For more examples, see the standard language label files. For information about the label keys and their default values, see the Player Label Reference.

Overriding individual labels

You can also override individual labels, using a label element as a child of the Labels element for each label you want to override. The label element contains a value to be used for a specific label in a player. Using a label element to override label texts is handy if there are only a select few labels that need to be overridden and when a full XML file is not needed, or the additional load of an XML file is not desired. The structure of the label element is:

<Labels>
  <label key="label name">label value</label>
</Labels>

You use the same label names in a label element as you use in a label set XML file. See the Player Label Reference for more information. The text of the label element can use any character set. For example, here is a Japanese label:

<Labels>
  <label key="YOU ARE WATCHING:">閲覧中の動画:</label>
</Labels>

Due to limitations in Flash, labels in right-to-left languages like Arabic, Farsi and Hebrew do not function well.

Note: Do not confuse the <label> element, a child of the <Labels> element, with the uppercase <Label> element, which is a UI element within a Layout.

What's Next...

In addition to localizing the labels in a player, you can:

Localize the player error messages that are displayed in cases where the player is unable to be rendered.

Specify the fonts used to render labels.

Tags
language, localization