api.getPreferredCountryLanguage()
Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown
Parameters
GetPreferredCountryLanguageParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
countryCode | string | A two-letter ISO 3166-1 alpha-2 country code |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'getPreferredCountryLanguage' | 'error'
airgram: Airgram
request: {
method: 'getPreferredCountryLanguage'
params: GetPreferredCountryLanguageParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}