scrabble-solver
Version:
Scrabble Solver 2 - Free, open-source, cross-platform, multi-language analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Crossplay, Literaki, and Kelimelik. Quickly find the top-scoring words using the given board and tiles.
21 lines (18 loc) • 495 B
text/typescript
/**
* Locales are defined using IETF language tags
* @see https://en.wikipedia.org/wiki/IETF_language_tag
* @see https://en.wikipedia.org/wiki/ISO_3166-1
*/
export enum Locale {
DE_DE = 'de-DE',
EN_GB = 'en-GB',
EN_US = 'en-US',
ES_ES = 'es-ES',
FA_IR = 'fa-IR',
FR_FR = 'fr-FR',
PL_PL = 'pl-PL',
RO_RO = 'ro-RO',
TR_TR = 'tr-TR',
}
const locales = Object.values(Locale);
export const isLocale = (locale: unknown): locale is Locale => locales.includes(locale as Locale);