aboutsummaryrefslogtreecommitdiff
path: root/src/i18n/index.ts
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-04-21 22:54:15 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-04-21 22:54:15 +0200
commitb4ef1a0d288565f744bf754af456c4f60da99ca7 (patch)
tree907c88a2e59370a0b06dbd60aa1cc297b67b004b /src/i18n/index.ts
parente96af5ce5e8dd00cf8a31d4812f416583defa449 (diff)
Refactor localization: remove i18n support and update layouts to use static text
Diffstat (limited to 'src/i18n/index.ts')
-rw-r--r--src/i18n/index.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/i18n/index.ts b/src/i18n/index.ts
deleted file mode 100644
index 3e6083b..0000000
--- a/src/i18n/index.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-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 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;
- }
-};
-
-export function getUrlWithoutLocale(url: string) {
- return url.replace(/\/[a-z]{2}\//, "/");
-}