diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-04-10 21:42:41 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-04-10 21:42:41 +0200 |
| commit | e3141794b95e534656427fadf0354435c62254d6 (patch) | |
| tree | 95788249ac51475aea45ad17d7157dffd1564e47 /src/i18n/index.ts | |
| parent | 3caee506c961ae0e78503164ed6a0f81db3c8c32 (diff) | |
Fix formatting
Diffstat (limited to 'src/i18n/index.ts')
| -rw-r--r-- | src/i18n/index.ts | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 4ed1a52..3e6083b 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -1,34 +1,34 @@ -import Spanish from './es.json'; -import English from './en.json'; +import Spanish from "./es.json"; +import English from "./en.json"; export const SHOW_DEFAULT_LANGUAGE = false; export const DEFAULT_LANGUAGE = "es"; export type LanguageKeys = "es" | "en"; -export const languages: Record<LanguageKeys, { code: string, name: string }> = { - es: { - code: "es", - name: "Español" - }, - en: { - code: "en", - name: "English" - } -} +export const languages: Record<LanguageKeys, { code: string; name: string }> = { + es: { + code: "es", + name: "Español", + }, + en: { + code: "en", + name: "English", + }, +}; export const LANGUAGE_CODES = Object.keys(languages); export const useTranslations = (lang: string | undefined) => { - switch (lang) { - case languages.en.code: - return English; - case languages.es.code: - default: - return Spanish; - } -} + switch (lang) { + case languages.en.code: + return English; + case languages.es.code: + default: + return Spanish; + } +}; export function getUrlWithoutLocale(url: string) { - return url.replace(/\/[a-z]{2}\//, "/"); -}
\ No newline at end of file + return url.replace(/\/[a-z]{2}\//, "/"); +} |
