-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,27 @@ | ||
export const getCalendar = () => "gregorian"; // the calendar identifier you want | ||
export const getCountry = () => "US"; // the country code you want | ||
export const getCurrencies = () => ["USD", "EUR"]; // can be empty array | ||
|
||
export const getLocales = () => [ | ||
// extend if needed, add the locales you want | ||
{ countryCode: "US", languageTag: "en-US", languageCode: "en", isRTL: false }, | ||
{ countryCode: "FR", languageTag: "fr-FR", languageCode: "fr", isRTL: false }, | ||
]; | ||
|
||
export const getNumberFormatSettings = () => ({ | ||
decimalSeparator: ".", | ||
groupingSeparator: ",", | ||
}); | ||
|
||
// use a provided translation, or return undefined to test your fallback | ||
export const findBestLanguageTag = () => ({ | ||
languageTag: "en-US", | ||
isRTL: false, | ||
}); | ||
|
||
export const getNumberFormatSettings = () => ({ | ||
decimalSeparator: ".", | ||
groupingSeparator: ",", | ||
}); | ||
|
||
export const getCalendar = () => "gregorian"; // the calendar identifier you want | ||
export const getCountry = () => "US"; // the country code you want | ||
export const getCurrencies = () => ["USD", "EUR"]; // can be empty array | ||
export const getTemperatureUnit = () => "celsius"; // or "fahrenheit" | ||
export const getTimeZone = () => "Europe/Paris"; // the timezone you want | ||
export const uses24HourClock = () => true; | ||
export const usesMetricSystem = () => true; | ||
export const usesAutoDateAndTime = () => true; | ||
export const usesAutoTimeZone = () => true; | ||
|
||
export default { | ||
getCalendar, | ||
getCountry, | ||
getCurrencies, | ||
getLocales, | ||
getNumberFormatSettings, | ||
getTemperatureUnit, | ||
getTimeZone, | ||
uses24HourClock, | ||
usesMetricSystem, | ||
usesAutoDateAndTime, | ||
usesAutoTimeZone, | ||
|
||
findBestLanguageTag, | ||
}; | ||
export const usesMetricSystem = () => true; |