| 1 | |
| 2 | [[PageOutline(3-4, Sections)]] |
| 3 | |
| 4 | == !GetSubLanguages == |
| 5 | |
| 6 | === Intro === |
| 7 | |
| 8 | get list os supported subtitle languages |
| 9 | |
| 10 | |
| 11 | ---- |
| 12 | === Description === |
| 13 | |
| 14 | '''struct !GetSubLanguages(string $language = 'en')''' |
| 15 | |
| 16 | Returns list of supported subtitle languages. |
| 17 | |
| 18 | |
| 19 | ---- |
| 20 | === Parameters === |
| 21 | |
| 22 | ''language'':: |
| 23 | * ISO639-1 2-letter language code of user's interface language. |
| 24 | * language names (''!LanguageName'') will be returned in this language |
| 25 | * default is ''en'' (english) |
| 26 | |
| 27 | |
| 28 | ---- |
| 29 | === Return Values === |
| 30 | |
| 31 | Output is returned in this structure: |
| 32 | |
| 33 | {{{ |
| 34 | struct( |
| 35 | array( |
| 36 | struct( |
| 37 | (string) [SubLanguageID], |
| 38 | (string) [LanguageName], |
| 39 | (string) [ISO639] |
| 40 | ) [lang] |
| 41 | ) [data], |
| 42 | (double) [seconds] |
| 43 | ) |
| 44 | }}} |
| 45 | |
| 46 | and contains these elements: |
| 47 | ''data'':: |
| 48 | array of enabled subtitle languages |
| 49 | * ''SubLanguageID'': ISO639-2 3-letter language code |
| 50 | * ''!LanguageName'': language name in language specified by parameter ''language'' |
| 51 | * ''ISO639'' : ISO639-1 2-letter language code |
| 52 | ''seconds'':: |
| 53 | time taken to execute this command on server |
| 54 | |
| 55 | |
| 56 | ---- |
| 57 | === Implementations === |
| 58 | |
| 59 | There are currently no available sample implementations. |
| 60 | |
| 61 | |
| 62 | ---- |
| 63 | === Changelog === |
| 64 | |
| 65 | Version 1: created this function |
| 66 | |
| 67 | |
| 68 | ---- |
| 69 | === Examples === |
| 70 | |
| 71 | |
| 72 | ==== Input ==== |
| 73 | |
| 74 | {{{ |
| 75 | #!xml |
| 76 | <methodCall> |
| 77 | <methodName>GetSubLanguages</methodName> |
| 78 | <params> |
| 79 | <param> |
| 80 | <value><string>en</string></value> |
| 81 | </param> |
| 82 | </params> |
| 83 | </methodCall> |
| 84 | }}} |
| 85 | |
| 86 | |
| 87 | ==== Output ==== |
| 88 | |
| 89 | {{{ |
| 90 | #!xml |
| 91 | <methodResponse> |
| 92 | <params> |
| 93 | <param> |
| 94 | <value> |
| 95 | <struct> |
| 96 | <member> |
| 97 | <name>data</name> |
| 98 | <value> |
| 99 | <array> |
| 100 | <data> |
| 101 | <value> |
| 102 | <struct> |
| 103 | <member> |
| 104 | <name>SubLanguageID</name> |
| 105 | <value><string>eng</string></value> |
| 106 | </member> |
| 107 | <member> |
| 108 | <name>LanguageName</name> |
| 109 | <value><string>English</string></value> |
| 110 | </member> |
| 111 | <member> |
| 112 | <name>ISO639</name> |
| 113 | <value><string>en</string></value> |
| 114 | </member> |
| 115 | </struct> |
| 116 | </value> |
| 117 | |
| 118 | ... more language information structures go here (if any) ... |
| 119 | |
| 120 | </data> |
| 121 | </array> |
| 122 | </value> |
| 123 | </member> |
| 124 | <member> |
| 125 | <name>seconds</name> |
| 126 | <value><double>0.024</double></value> |
| 127 | </member> |
| 128 | </struct> |
| 129 | </value> |
| 130 | </param> |
| 131 | </params> |
| 132 | </methodResponse> |
| 133 | }}} |
| 134 | |
| 135 | |
| 136 | ---- |
| 137 | === Notes === |
| 138 | |
| 139 | * see [http://www.loc.gov/standards/iso639-2/php/code_list.php ISO639-1] 2-letter language codes |
| 140 | |
| 141 | |
| 142 | ---- |
| 143 | === See also === |
| 144 | |
| 145 | |
| 146 | ---- |
| 147 | === Comments === |
| 148 | |
| 149 | add your comments, hints and suggestions here if you like ... |
| 150 | |
| 151 | |
| 152 | -------- |
| 153 | [Prev] [wiki:XmlRpcIntro Home] [Next] |