Enum google_maps::prelude::Language
source · #[non_exhaustive]#[repr(u16)]pub enum Language {
Show 85 variants
Afrikaans = 0,
Albanian = 1,
Amharic = 2,
Arabic = 3,
Armenian = 4,
Azerbaijani = 5,
Basque = 6,
Belarusian = 7,
Bengali = 8,
Bosnian = 9,
Bulgarian = 10,
Burmese = 11,
Catalan = 12,
Chinese = 13,
ChineseHongKong = 14,
ChineseSimplified = 15,
ChineseTaiwan = 16,
ChineseTraditional = 17,
Croatian = 18,
Czech = 19,
Danish = 20,
Dutch = 21,
English = 22,
EnglishAustralian = 23,
EnglishCanada = 24,
EnglishGreatBritain = 25,
EnglishUs = 26,
Estonian = 27,
Farsi = 28,
Finnish = 29,
Filipino = 30,
French = 31,
FrenchCanada = 32,
Galician = 33,
Georgian = 34,
German = 35,
Greek = 36,
Gujarati = 37,
Hebrew = 38,
Hindi = 39,
Hungarian = 40,
Icelandic = 41,
Indonesian = 42,
Italian = 43,
Japanese = 44,
Kannada = 45,
Kazakh = 46,
Khmer = 47,
Korean = 48,
Kyrgyz = 49,
Lao = 50,
Latvian = 51,
Lithuanian = 52,
Macedonian = 53,
Malay = 54,
Malayalam = 55,
Marathi = 56,
Mongolian = 57,
Nepali = 58,
Norwegian = 59,
Polish = 60,
Portuguese = 61,
PortugueseBrazil = 62,
PortuguesePortugal = 63,
Punjabi = 64,
Romanian = 65,
Russian = 66,
Serbian = 67,
Sinhalese = 68,
Slovak = 69,
Slovenian = 70,
Spanish = 71,
SpanishLatinAmerica = 72,
Swahili = 73,
Swedish = 74,
Tamil = 75,
Telugu = 76,
Thai = 77,
Turkish = 78,
Ukrainian = 79,
Urdu = 80,
Uzbek = 81,
Vietnamese = 82,
Zulu = 83,
Other = 84,
}
Expand description
Specifies the language in which to return results.
§Languages
-
See the list of supported languages. Google often updates the supported languages, so this list may not be exhaustive.
-
If
language
is not supplied, the API attempts to use the preferred language as specified in theAccept-Language
header, or the native language of the domain from which the request is sent. -
The API does its best to provide a street address that is readable for both the user and locals. To achieve that goal, it returns street addresses in the local language, transliterated to a script readable by the user if necessary, observing the preferred language. All other addresses are returned in the preferred language. Address components are all returned in the same language, which is chosen from the first component.
-
If a name is not available in the preferred language, the API uses the closest match.
-
The preferred language has a small influence on the set of results that the API chooses to return, and the order in which they are returned. The geocoder interprets abbreviations differently depending on language, such as the abbreviations for street types, or synonyms that may be valid in one language but not in another. For example, utca and tér are synonyms for street in Hungarian.
By default the API will attempt to load the most appropriate language based on the users location or browser settings. Some APIs allow you to explicitly set a language when you make a request. More information on how to set the language is available in the documentation for each API:
Supported Languages: Google often updates supported languages. This list may not be exhaustive and is subject to change.
You can see what the map will look like in any of the languages listed above in this sample application.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Afrikaans = 0
Albanian = 1
Amharic = 2
Arabic = 3
Armenian = 4
Azerbaijani = 5
Basque = 6
Belarusian = 7
Bengali = 8
Bosnian = 9
Bulgarian = 10
Burmese = 11
Catalan = 12
Chinese = 13
ChineseHongKong = 14
ChineseSimplified = 15
ChineseTaiwan = 16
ChineseTraditional = 17
Croatian = 18
Czech = 19
Danish = 20
Dutch = 21
English = 22
EnglishAustralian = 23
EnglishCanada = 24
EnglishGreatBritain = 25
EnglishUs = 26
Estonian = 27
Farsi = 28
Finnish = 29
Filipino = 30
French = 31
FrenchCanada = 32
Galician = 33
Georgian = 34
German = 35
Greek = 36
Gujarati = 37
Hebrew = 38
Hindi = 39
Hungarian = 40
Icelandic = 41
Indonesian = 42
Italian = 43
Japanese = 44
Kannada = 45
Kazakh = 46
Khmer = 47
Korean = 48
Kyrgyz = 49
Lao = 50
Latvian = 51
Lithuanian = 52
Macedonian = 53
Malay = 54
Malayalam = 55
Marathi = 56
Mongolian = 57
Nepali = 58
Norwegian = 59
Polish = 60
Portuguese = 61
PortugueseBrazil = 62
PortuguesePortugal = 63
Punjabi = 64
Romanian = 65
Russian = 66
Serbian = 67
Sinhalese = 68
Slovak = 69
Slovenian = 70
Spanish = 71
SpanishLatinAmerica = 72
Swahili = 73
Swedish = 74
Tamil = 75
Telugu = 76
Thai = 77
Turkish = 78
Ukrainian = 79
Urdu = 80
Uzbek = 81
Vietnamese = 82
Zulu = 83
Other = 84
If the language is not recognized by
serde when reading data from
Google it will be assigned to this Other
variant.
As new types are added to Google Maps, they must also be added to this
crate. However, in the meantime, the Other
catch-all variant allows
serde
to read data from Google without producing an error until the
new variant added to this enum
.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Language
impl<'de> Deserialize<'de> for Language
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Manual implementation of Deserialize
for serde
. This will take
advantage of the phf
-powered TryFrom
implementation for this type.
source§impl Ord for Language
impl Ord for Language
source§impl PartialEq for Language
impl PartialEq for Language
source§impl PartialOrd for Language
impl PartialOrd for Language
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more