Home | History | Annotate | Download | only in util

Lines Matching defs:language

5 // This file defines a helper class for selecting a supported language from a
23 const wchar_t* language;
27 // The language we fall back upon when all else fails.
34 // A sorted array of language identifiers (and their offsets) for which
43 // A sorted array of language identifiers that are aliases to other languages
74 // A sorted array of neutral language identifiers that are wildcard aliases to
94 if (!(std::wstring(first->language) < (first + 1)->language) ||
127 return left.language < right;
133 return left < right.language;
138 return std::wstring(left.language) < right.language;
147 // a given language |name|.
151 if (last != search_result && search_result->language == name) {
159 // offset of a translated language. The search first tries to find an exact
161 bool GetLanguageOffset(const std::wstring& language, int* offset) {
168 language, offset) ||
172 language, offset);
176 // wildcard match with |language|'s primary language subtag.
177 bool MatchLanguageOffset(const std::wstring& language, int* offset) {
178 std::wstring primary_language = language.substr(0, language.find(L'-'));
188 // Adds to |candidates| the eligible languages on the system. Any language
193 std::wstring language;
196 GoogleUpdateSettings::GetLanguage(&language);
197 if (!language.empty()) {
198 candidates->push_back(language);
244 return search_result->language;
246 NOTREACHED() << "Unknown language offset.";
253 // candidate and |matched_offset| is assigned the language offset of the
286 VLOG(1) << "No suitable language found for any candidates.";