android-components / mozilla.components.browser.search.provider.localization / SearchLocalization

SearchLocalization

data class SearchLocalization (source)

Data class representing the result of calling SearchLocalizationProvider.determineRegion.

Constructors

Name Summary
<init> SearchLocalization(language: String, country: String, region: String? = null)
Data class representing the result of calling SearchLocalizationProvider.determineRegion.

Properties

Name Summary
country val country: String
ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code. Example: “US” (United States), “FR” (France), “029” (Caribbean)
language val language: String
ISO 639 alpha-2 or alpha-3 language code, or registered language subtags up to 8 alpha letters (for future enhancements). Example: “en” (English), “ja” (Japanese), “kok” (Konkani)
languageTag val languageTag: String
Returns a language tag of the form -.
region val region: String?

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.