mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
[expo] Add Localization
This commit is contained in:
@@ -37,6 +37,7 @@ import {
|
||||
LinearGradient,
|
||||
Linking,
|
||||
Location,
|
||||
Localization,
|
||||
MailComposer,
|
||||
MapEvent,
|
||||
MapStyleElement,
|
||||
@@ -1094,6 +1095,28 @@ async () => {
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Localization
|
||||
|
||||
let locale: string = Localization.locale;
|
||||
let locales: string[] = Localization.locales;
|
||||
let country: string | undefined = Localization.country;
|
||||
let isoCurrencyCodes: string[] | undefined = Localization.isoCurrencyCodes;
|
||||
let timezone: string = Localization.timezone;
|
||||
let isRTL: boolean = Localization.isRTL;
|
||||
|
||||
async () => {
|
||||
const localizationData = await Localization.getLocalizationAsync();
|
||||
|
||||
locale = localizationData.locale;
|
||||
locales = localizationData.locales;
|
||||
country = localizationData.country;
|
||||
isoCurrencyCodes = localizationData.isoCurrencyCodes;
|
||||
timezone = localizationData.timezone;
|
||||
isRTL = localizationData.isRTL;
|
||||
};
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Contacts
|
||||
Contacts.Fields.ID === 'id';
|
||||
Contacts.Fields.Name === 'name';
|
||||
|
||||
Vendored
+23
@@ -2244,6 +2244,29 @@ export namespace Location {
|
||||
function setApiKey(key: string): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Localization
|
||||
*/
|
||||
export namespace Localization {
|
||||
const locale: string;
|
||||
const locales: string[];
|
||||
const country: string | undefined;
|
||||
const isoCurrencyCodes: string[] | undefined;
|
||||
const timezone: string;
|
||||
const isRTL: boolean;
|
||||
|
||||
interface LocalizationData {
|
||||
locale: string;
|
||||
locales: string[];
|
||||
country?: string;
|
||||
isoCurrencyCodes?: string[];
|
||||
timezone: string;
|
||||
isRTL: boolean;
|
||||
}
|
||||
|
||||
function getLocalizationAsync(): Promise<LocalizationData>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magnetometer
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user