mirror of
https://github.com/videojs/video.js.git
synced 2024-11-24 08:42:25 +02:00
@mister-ben Added en.json as localization template. closes #3096
This commit is contained in:
parent
d8ba649549
commit
e12ca69306
@ -7,6 +7,7 @@ CHANGELOG
|
||||
* @forbesjo updated travis to use latest firefox ([view](https://github.com/videojs/video.js/pull/3112))
|
||||
* @Naouak updated time display to not change if values do not change ([view](https://github.com/videojs/video.js/pull/3101))
|
||||
* @forbesjo updated track settings to not fail restoring settings when localStorage is not available ([view](https://github.com/videojs/video.js/pull/3120))
|
||||
* @mister-ben Added en.json as localization template ([view](https://github.com/videojs/video.js/pull/3096))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -5,7 +5,11 @@ Multiple language support allows for users of non-English locales to natively in
|
||||
|
||||
Creating the Language File
|
||||
--------------------------
|
||||
Video.js uses key/value object dictionaries in JSON form. A sample dictionary for Spanish `['es']` would look as follows;
|
||||
Video.js uses key/value object dictionaries in JSON form.
|
||||
|
||||
An English lang file is at [/lang/en.json](https://github.com/videojs/video.js/tree/master/lang/en.json) which should be used as a template for new files. This will be kept up to date with strings in the core player that need localizations.
|
||||
|
||||
A sample dictionary for Spanish `['es']` would look as follows:
|
||||
|
||||
```JSON
|
||||
{
|
||||
@ -38,7 +42,7 @@ Video.js uses key/value object dictionaries in JSON form. A sample dictionary fo
|
||||
|
||||
Notes:
|
||||
|
||||
- The file name should always be in the format `XX.json`, where `XX` is the two letter value of the language reported to the browser (for options see the bottom of this document).
|
||||
- The file name should always be in the format `XX.json`, where `XX` is the language code. This should be a two letter code (for options see the bottom of this document) except for cases where a more specific code with sub-code is appropriate, e.g. `zh-CN.lang`.
|
||||
- For automatic inclusion at build time, add your language file to the `/lang` directory (see 'Adding Languages to Video.js below').
|
||||
|
||||
Adding Languages to Video.js
|
||||
|
10
lang/de.json
10
lang/de.json
@ -22,5 +22,13 @@
|
||||
"A network error caused the media download to fail part-way.": "Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.",
|
||||
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.",
|
||||
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.",
|
||||
"No compatible source was found for this media.": "Für dieses Video wurde keine kompatible Quelle gefunden."
|
||||
"No compatible source was found for this media.": "Für dieses Video wurde keine kompatible Quelle gefunden.",
|
||||
"Play video": "Video abspielen",
|
||||
"Close": "Schließen",
|
||||
"Modal Window": "Modales Fenster",
|
||||
"This is a modal window": "Dies ist ein modales Fenster",
|
||||
"This modal can be closed by pressing the Escape key or activating the close button.": "Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche \"Schließen\" wird dieses modale Fenster geschlossen.",
|
||||
", opens captions settings dialog": ", öffnet Einstellungen für Untertitel",
|
||||
", opens subtitles settings dialog": ", öffnet Einstellungen für Untertitel",
|
||||
", selected": " (ausgewählt)"
|
||||
}
|
||||
|
34
lang/en.json
Normal file
34
lang/en.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"Play": "Play",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Current Time",
|
||||
"Duration Time": "Duration Time",
|
||||
"Remaining Time": "Remaining Time",
|
||||
"Stream Type": "Stream Type",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Loaded",
|
||||
"Progress": "Progress",
|
||||
"Fullscreen": "Fullscreen",
|
||||
"Non-Fullscreen": "Non-Fullscreen",
|
||||
"Mute": "Mute",
|
||||
"Unmute": "Unmute",
|
||||
"Playback Rate": "Playback Rate",
|
||||
"Subtitles": "Subtitles",
|
||||
"subtitles off": "subtitles off",
|
||||
"Captions": "Captions",
|
||||
"captions off": "captions off",
|
||||
"Chapters": "Chapters",
|
||||
"You aborted the media playback": "You aborted the media playback",
|
||||
"A network error caused the media download to fail part-way.": "A network error caused the media download to fail part-way.",
|
||||
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "The media could not be loaded, either because the server or network failed or because the format is not supported.",
|
||||
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",
|
||||
"No compatible source was found for this media.": "No compatible source was found for this media.",
|
||||
"Play video": "Play video",
|
||||
"Close": "Close",
|
||||
"Modal Window": "Modal Window",
|
||||
"This is a modal window": "This is a modal window",
|
||||
"This modal can be closed by pressing the Escape key or activating the close button.": "This modal can be closed by pressing the Escape key or activating the close button.",
|
||||
", opens captions settings dialog": ", opens captions settings dialog",
|
||||
", opens subtitles settings dialog": ", opens subtitles settings dialog",
|
||||
", selected": ", selected"
|
||||
}
|
Loading…
Reference in New Issue
Block a user