119 super(HelpLanguagesDialog, self).accept() |
119 super(HelpLanguagesDialog, self).accept() |
120 |
120 |
121 @classmethod |
121 @classmethod |
122 def httpString(cls, languages): |
122 def httpString(cls, languages): |
123 """ |
123 """ |
124 Class method to convert a list of acceptable languages into a byte |
124 Class method to convert a list of acceptable languages into a |
125 array. |
125 byte array. |
126 |
126 |
127 The byte array can be sent along with the Accept-Language http header |
127 The byte array can be sent along with the Accept-Language http header |
128 (see RFC 2616). |
128 (see RFC 2616). |
129 |
129 |
130 @param languages list of acceptable languages (list of strings) |
130 @param languages list of acceptable languages (list of strings) |
159 return cls.expand(QLocale(language).language()) |
159 return cls.expand(QLocale(language).language()) |
160 |
160 |
161 @classmethod |
161 @classmethod |
162 def expand(cls, language): |
162 def expand(cls, language): |
163 """ |
163 """ |
164 Class method to expand a language enum to a readable languages list. |
164 Class method to expand a language enum to a readable languages |
|
165 list. |
165 |
166 |
166 @param language language number (QLocale.Language) |
167 @param language language number (QLocale.Language) |
167 @return list of expanded language names (list of strings) |
168 @return list of expanded language names (list of strings) |
168 """ |
169 """ |
169 allLanguages = [] |
170 allLanguages = [] |