mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-04 08:37:14 +00:00
feat: marketplace page
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import '@/i18n';
|
||||
import { I18nLabel } from '@/app/infra/entities/common';
|
||||
import { I18nObject } from '@/app/infra/entities/common';
|
||||
|
||||
interface I18nProviderProps {
|
||||
children: ReactNode;
|
||||
@@ -11,7 +11,7 @@ interface I18nProviderProps {
|
||||
export default function I18nProvider({ children }: I18nProviderProps) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
export function i18nObj(i18nLabel: I18nLabel): string {
|
||||
export function extractI18nObject(i18nLabel: I18nObject): string {
|
||||
const language = localStorage.getItem('langbot_language');
|
||||
if ((language === 'zh-Hans' && i18nLabel.zh_Hans) || !i18nLabel.en_US) {
|
||||
return i18nLabel.zh_Hans;
|
||||
|
||||
Reference in New Issue
Block a user