android-components / / SearchLocalizationProvider


interface SearchLocalizationProvider (source)

Class providing language, country and optionally region (actual location) of the user/device to customize the search experience.


Name Summary
determineRegion abstract suspend fun determineRegion(): SearchLocalization

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.


Name Summary
LocaleSearchLocalizationProvider class LocaleSearchLocalizationProvider : SearchLocalizationProvider
LocalizationProvider implementation that only provides the language and country from the system’s default languageTag.
RegionSearchLocalizationProvider class RegionSearchLocalizationProvider : SearchLocalizationProvider
SearchLocalizationProvider implementation that uses a MozillaLocationService instance to do a region lookup via GeoIP.