Skip to content

Commit

Permalink
fixed the issue from lang/helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tu2-atmanand committed Oct 31, 2024
1 parent bfc29f2 commit 61a989a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/utils/lang/helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Import all the language files

import en, { Lang } from "./locale/en";

import ar from "./locale/ar";
Expand Down Expand Up @@ -60,7 +61,7 @@ const getLanguage = (): string => {
};

// Function to fetch the locale based on the current language
const getLocale = (): string => {
const getLocale = (): Partial<Lang> => {
const lang = getLanguage();
const locale = localeMap[lang] || localeMap["en"]; // Fallback to 'en' if the language is not found
if (!locale) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/lang/locale/en.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const en = {
const en: Lang = {
1: "Save",
2: "Close",
3: "Archive",
Expand Down

0 comments on commit 61a989a

Please sign in to comment.