Skip to content

Commit

Permalink
feat: exclude language
Browse files Browse the repository at this point in the history
  • Loading branch information
paring-chan committed Jan 3, 2025
1 parent e3f22ed commit 945df4a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/lib/utils/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ import { FluentBundle, FluentResource, type FluentVariable } from '@fluent/bundl
import { translationData } from '$lib/localization/translations/index.js'

export const availableLanguages: LangResponse[] = langs

export const fallbackLang = 'ko'

export const excludeLanguages = (...languages: string[]) => {
languages.forEach((l) => {
const index = availableLanguages.findIndex((x) => x.code === l)
if (index >= 0) {
availableLanguages.splice(index, 1)
}
})
}

const registeredLangSections: string[] = []

const langSections = ['ui-common', 'ui-footer', 'ui-search'] as const
Expand Down

0 comments on commit 945df4a

Please sign in to comment.