| 189 | } |
| 190 | |
| 191 | void Processor::SetPreferredLocale(string const & locale) |
| 192 | { |
| 193 | ASSERT(!locale.empty(), ()); |
| 194 | |
| 195 | LOG(LINFO, ("New preferred locale:", locale)); |
| 196 | |
| 197 | localisation::LanguageIndex const languageIndex = localisation::ConvertLanguageCodeToLanguageIndex(locale); |
| 198 | m_keywordsScorer.SetLanguages(LanguageTier::LANGUAGE_TIER_CURRENT, localisation::SimilarLanguageIndexes(languageIndex)); |
| 199 | |
| 200 | m_currentLanguageIndex = CategoriesHolder::MapLocaleToInteger(locale); |
| 201 | |
| 202 | // Default initialization. |
| 203 | // If you want to reset input language, call SetInputLocale before search. |
| 204 | SetInputLocale(locale); |
| 205 | m_ranker.SetLocale(locale); |
| 206 | } |
| 207 | |
| 208 | void Processor::SetInputLocale(string const & locale) |
| 209 | { |
no test coverage detected