You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ If these doesn't answer your question
11
11
* Use [our Slack](https://bit.ly/plyr-chat) if you need help using Plyr or have questions about Plyr.
12
12
13
13
## Commenting
14
+
14
15
When commenting, keep a civil tone and stay on topic. Don't ask for [support](#support), or post "+1" or "I agree" type of comments. Use the emojis instead.
15
16
16
17
Asking for the status on issues is discouraged. Unless someone has explicitly said in an issue that it's work in progress, most likely that means no one is working on it. We have a lot to do, and it may not be a top priority for us.
@@ -38,3 +39,15 @@ Please follow the instructions in our issue templates. Don't use github issues t
38
39
* When finished, push the changes to your GitHub repository and send a pull request to **develop**. Describe what your PR does.
39
40
40
41
* If the Travis build fails, or if you get a code review with change requests, you can fix these by pushing new or rebased commits to the branch.
42
+
43
+
## Contributing translations
44
+
45
+
* Fork Plyr, and create a new branch in your fork, based on the **develop** branch
46
+
47
+
* Make and translate language file `src/locales/{lang}.js`, where `{lang}` is two-letter language code from [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). It is recommended to copy and edit English translation.
48
+
49
+
* Add your language to `src/locales/index.js`. Make sure to import your file and follow the file format. The entry `name` should be native name of language.
50
+
51
+
* Test your changes.
52
+
53
+
* When finished, commit and push the changes to your GitHub repository and send a pull request to **develop**.
-**Playsinline** - supports the `playsinline` attribute
26
27
-**Speed controls** - adjust speed on the fly
27
28
-**Multiple captions** - support for multiple caption tracks
28
-
-**i18n support** - support for internationalization of controls
29
29
-**No dependencies** - written in "vanilla" ES6 JavaScript, no jQuery required
30
30
-**SASS** - to include in your build processes
31
31
@@ -286,6 +286,7 @@ Note the single quotes encapsulating the JSON and double quotes on the object ke
286
286
|`debug`| Boolean |`false`| Display debugging information in the console |
287
287
|`controls`| Array, Function or Element |`['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen']`| If a function is passed, it is assumed your method will return either an element or HTML string for the controls. Three arguments will be passed to your function; `id` (the unique id for the player), `seektime` (the seektime step in seconds), and `title` (the media title). See [controls.md](controls.md) for more info on how the html needs to be structured. |
288
288
|`settings`| Array |`['captions', 'quality', 'speed', 'loop']`| If you're using the default controls are used then you can specify which settings to show in the menu |
289
+
|`language`| String |`en`| Language code (ISO 639-1) for UI internationalization. |
289
290
|`i18n`| Object | See [defaults.js](/src/js/config/defaults.js)| Used for internationalization (i18n) of the text within the UI. |
290
291
|`loadSprite`| Boolean |`true`| Load the SVG sprite specified as the `iconUrl` option (if a URL). If `false`, it is assumed you are handling sprite loading yourself. |
291
292
|`iconUrl`| String |`null`| Specify a URL or path to the SVG sprite. See the [SVG section](#svg) for more info. |
@@ -619,6 +620,12 @@ document then the shortcuts will work when any element has focus, apart from an
619
620
620
621
Fullscreen in Plyr is supported by all browsers that [currently support it](http://caniuse.com/#feat=fullscreen).
621
622
623
+
## Internationalization
624
+
625
+
Internationalization (i18n) language could be specified with `language` option. It will translate all controls in Plyr. If the language is not specified, it will default to English.
626
+
627
+
If you want custom internationalization values, you should specify them to `i18n` option.
628
+
622
629
## Browser support
623
630
624
631
Plyr supports the last 2 versions of most _modern_ browsers.
0 commit comments