25 changed files with 14788 additions and 2829 deletions
@ -0,0 +1,104 @@ |
|||||||
|
{ |
||||||
|
"selectCountry": "Select your country", |
||||||
|
"subtitle": "You can change the country & language in your profile settings anytime.", |
||||||
|
"welcomeTitle": "Welcome!", |
||||||
|
"welcomeMessage": "Thank you for choosing your country. You can now log in and use the app.", |
||||||
|
"loginNow": "Log in now", |
||||||
|
"mainAppTitle": "Welcome to MainApp", |
||||||
|
"mainAppText": "This is the main application screen.", |
||||||
|
"resetCountry": "Reset Country Selection", |
||||||
|
"loginTitle": "Login For brainnel", |
||||||
|
"loginSubtitle": "Login to start your business", |
||||||
|
"continueWithGoogle": "Continue with Google", |
||||||
|
"continueWithFacebook": "Continue with Facebook", |
||||||
|
"continueWithApple": "Continue with Apple", |
||||||
|
"continueWithInstagram": "Continue with Instagram", |
||||||
|
"continueWithEmail": "Continue with Email", |
||||||
|
"continueWithPhone": "Continue with phone number", |
||||||
|
"orContinueWith": "Or continue with", |
||||||
|
"instagram": "Instagram", |
||||||
|
"email": "Email", |
||||||
|
"phone": "Phone", |
||||||
|
"forgotPassword": "Forget your password?", |
||||||
|
"termsText": "By continuing, you agree to our", |
||||||
|
"termsOfUse": "Terms of Use", |
||||||
|
"and": "and", |
||||||
|
"privacyPolicy": "Privacy Policy", |
||||||
|
"wholesalePrice": "Wholesale price", |
||||||
|
"fastShipping": "Fast shipping", |
||||||
|
"shipping": "Shipping", |
||||||
|
"quote": "Quote", |
||||||
|
"tiktok": "TikTok", |
||||||
|
"howToBuy": "How to Buy", |
||||||
|
"all": "All", |
||||||
|
"electronics": "Electronics", |
||||||
|
"clothing": "Clothing", |
||||||
|
"home": "Home", |
||||||
|
"beauty": "Beauty", |
||||||
|
"kids": "Kids", |
||||||
|
"logInOrSignUp": "Log in or sign up", |
||||||
|
"phoneNumber": "Phone number", |
||||||
|
"enterPassword": "Please re-enter your password", |
||||||
|
"passwordIncorrect": "Password incorrect, please confirm your password.", |
||||||
|
"verificationCodeInfo": "We will send a verification code on your number to confirm it's you.", |
||||||
|
"continue": "Continue", |
||||||
|
"pleaseEnterEmail": "Please enter your e-mail address", |
||||||
|
"searchProducts": "Search products", |
||||||
|
"priceRange": "Price range", |
||||||
|
"minPrice": "Min price", |
||||||
|
"maxPrice": "Max price", |
||||||
|
"reset": "Reset", |
||||||
|
"apply": "Apply", |
||||||
|
"price": "Price", |
||||||
|
"lowToHigh": "Low to high", |
||||||
|
"highToLow": "High to low", |
||||||
|
"time": "Time", |
||||||
|
"oldest": "Oldest", |
||||||
|
"newest": "Newest", |
||||||
|
"noResults": "No results found for", |
||||||
|
"tryDifferentKeywords": "Try using different keywords or check your spelling", |
||||||
|
"loadingMore": "Loading more...", |
||||||
|
"noMoreData": "No more data", |
||||||
|
"monthlySales": "ventes", |
||||||
|
"search": "Search", |
||||||
|
"searchPlaceholder": "Search products", |
||||||
|
"cancel": "Cancel", |
||||||
|
"searchHistory": "Search History", |
||||||
|
"hotSearch": "Hot Search", |
||||||
|
"noRecentSearches": "You have not recent searches", |
||||||
|
"headphones": "Headphones", |
||||||
|
"computer": "Computer", |
||||||
|
"tablet": "Tablet", |
||||||
|
"watch": "Watch", |
||||||
|
"camera": "Camera", |
||||||
|
"homeAppliance": "Home Appliance", |
||||||
|
"food": "Food", |
||||||
|
"summerWomenClothes": "Summer women clothes", |
||||||
|
"plusSizeWomen": "Plus size women", |
||||||
|
"sexyUnderwear": "Sexy underwear", |
||||||
|
"homeDecor": "Home decor", |
||||||
|
"unusualToys": "Unusual toys", |
||||||
|
"productDetail": "Product Detail", |
||||||
|
"addToCart": "Add to Cart", |
||||||
|
"buyNow": "Buy Now", |
||||||
|
"color": "Color", |
||||||
|
"size": "Size", |
||||||
|
"moreFromStore": "More from this Store", |
||||||
|
"viewAll": "View All", |
||||||
|
"loadingProductInfo": "Loading product information...", |
||||||
|
"productNotAvailable": "Product is not available or has been removed", |
||||||
|
"customerService": "Customer Service", |
||||||
|
"productDetails": "Product Details", |
||||||
|
"loadingMoreProducts": "Loading more products...", |
||||||
|
"noMoreProducts": "No more products", |
||||||
|
"chatNow": "Chat Now", |
||||||
|
"popularCategories": "Popular Categories", |
||||||
|
"setting": { |
||||||
|
"title": "Select Language and Currency", |
||||||
|
"country": "Country", |
||||||
|
"currency": "Currency", |
||||||
|
"language": "Language", |
||||||
|
"confirm": "Confirm", |
||||||
|
"success": "Settings saved successfully" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,104 @@ |
|||||||
|
{ |
||||||
|
"selectCountry": "Sélectionnez votre pays", |
||||||
|
"subtitle": "Vous pouvez modifier le pays et la langue dans vos paramètres de profil à tout moment.", |
||||||
|
"welcomeTitle": "Bienvenue !", |
||||||
|
"welcomeMessage": "Merci d'avoir choisi votre pays. Vous pouvez maintenant vous connecter et utiliser l'application.", |
||||||
|
"loginNow": "Connectez-vous maintenant", |
||||||
|
"mainAppTitle": "Bienvenue sur MainApp", |
||||||
|
"mainAppText": "Ceci est l'écran principal de l'application.", |
||||||
|
"resetCountry": "Réinitialiser la sélection du pays", |
||||||
|
"loginTitle": "Connexion à Brainnel", |
||||||
|
"loginSubtitle": "Connectez-vous pour démarrer votre activité", |
||||||
|
"continueWithGoogle": "Continuer avec Google", |
||||||
|
"continueWithFacebook": "Continuer avec Facebook", |
||||||
|
"continueWithApple": "Continuer avec Apple", |
||||||
|
"continueWithInstagram": "Continuer avec Instagram", |
||||||
|
"continueWithEmail": "Continuer avec l'email", |
||||||
|
"continueWithPhone": "Continuer avec le numéro de téléphone", |
||||||
|
"orContinueWith": "Ou continuer avec", |
||||||
|
"instagram": "Instagram", |
||||||
|
"email": "Email", |
||||||
|
"phone": "Téléphone", |
||||||
|
"forgotPassword": "Mot de passe oublié ?", |
||||||
|
"termsText": "En continuant, vous acceptez nos", |
||||||
|
"termsOfUse": "Conditions d'utilisation", |
||||||
|
"and": "et", |
||||||
|
"privacyPolicy": "Politique de confidentialité", |
||||||
|
"wholesalePrice": "Prix de gros", |
||||||
|
"fastShipping": "Livraison rapide", |
||||||
|
"shipping": "Livraison", |
||||||
|
"quote": "Devis", |
||||||
|
"tiktok": "TikTok", |
||||||
|
"howToBuy": "Comment acheter", |
||||||
|
"all": "Tout", |
||||||
|
"electronics": "Électronique", |
||||||
|
"clothing": "Vêtements", |
||||||
|
"home": "Maison", |
||||||
|
"beauty": "Beauté", |
||||||
|
"kids": "Enfants", |
||||||
|
"logInOrSignUp": "Se connecter ou s'inscrire", |
||||||
|
"phoneNumber": "Numéro de téléphone", |
||||||
|
"enterPassword": "Veuillez réentrer votre mot de passe", |
||||||
|
"passwordIncorrect": "Mot de passe incorrect, veuillez confirmer votre mot de passe.", |
||||||
|
"verificationCodeInfo": "Nous enverrons un code de vérification sur votre numéro pour confirmer que c'est vous.", |
||||||
|
"continue": "Continuer", |
||||||
|
"pleaseEnterEmail": "Veuillez entrer votre adresse e-mail", |
||||||
|
"searchProducts": "Rechercher des produits", |
||||||
|
"priceRange": "Fourchette de prix", |
||||||
|
"minPrice": "Prix minimum", |
||||||
|
"maxPrice": "Prix maximum", |
||||||
|
"reset": "Réinitialiser", |
||||||
|
"apply": "Appliquer", |
||||||
|
"price": "Prix", |
||||||
|
"lowToHigh": "Du plus bas au plus élevé", |
||||||
|
"highToLow": "Du plus élevé au plus bas", |
||||||
|
"time": "Temps", |
||||||
|
"oldest": "Plus ancien", |
||||||
|
"newest": "Plus récent", |
||||||
|
"noResults": "Aucun résultat trouvé", |
||||||
|
"tryDifferentKeywords": "Essayez d'utiliser des mots-clés différents ou vérifiez votre orthographe", |
||||||
|
"loadingMore": "Chargement en cours...", |
||||||
|
"noMoreData": "Plus de données", |
||||||
|
"monthlySales": "Ventes mensuelles", |
||||||
|
"search": "Rechercher", |
||||||
|
"searchPlaceholder": "Rechercher des produits", |
||||||
|
"cancel": "Annuler", |
||||||
|
"searchHistory": "Historique de recherche", |
||||||
|
"hotSearch": "Recherches populaires", |
||||||
|
"noRecentSearches": "Vous n'avez pas de recherches récentes", |
||||||
|
"headphones": "Casques", |
||||||
|
"computer": "Ordinateur", |
||||||
|
"tablet": "Tablette", |
||||||
|
"watch": "Montre", |
||||||
|
"camera": "Appareil photo", |
||||||
|
"homeAppliance": "Électroménager", |
||||||
|
"food": "Alimentation", |
||||||
|
"summerWomenClothes": "Vêtements d'été pour femmes", |
||||||
|
"plusSizeWomen": "Grandes tailles pour femmes", |
||||||
|
"sexyUnderwear": "Lingerie sexy", |
||||||
|
"homeDecor": "Décoration d'intérieur", |
||||||
|
"unusualToys": "Jouets insolites", |
||||||
|
"productDetail": "Détails du produit", |
||||||
|
"addToCart": "Ajouter au panier", |
||||||
|
"buyNow": "Acheter maintenant", |
||||||
|
"color": "Couleur", |
||||||
|
"size": "Taille", |
||||||
|
"moreFromStore": "Plus de ce magasin", |
||||||
|
"viewAll": "Voir tout", |
||||||
|
"loadingProductInfo": "Chargement des informations du produit...", |
||||||
|
"productNotAvailable": "Le produit n'est pas disponible ou a été supprimé", |
||||||
|
"customerService": "Service client", |
||||||
|
"productDetails": "Détails du produit", |
||||||
|
"loadingMoreProducts": "Chargement de plus de produits...", |
||||||
|
"noMoreProducts": "Plus de produits", |
||||||
|
"chatNow": "Discuter maintenant", |
||||||
|
"popularCategories": "Catégories populaires", |
||||||
|
"setting": { |
||||||
|
"title": "Sélectionner la langue et la devise", |
||||||
|
"country": "Pays", |
||||||
|
"currency": "Devise", |
||||||
|
"language": "Langue", |
||||||
|
"confirm": "Confirmer", |
||||||
|
"success": "Paramètres enregistrés avec succès" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,104 @@ |
|||||||
|
{ |
||||||
|
"selectCountry": "选择您的国家", |
||||||
|
"subtitle": "您可以随时在个人资料设置中更改国家和语言。", |
||||||
|
"welcomeTitle": "欢迎!", |
||||||
|
"welcomeMessage": "感谢您选择国家。您现在可以登录并使用该应用。", |
||||||
|
"loginNow": "立即登录", |
||||||
|
"mainAppTitle": "欢迎使用 MainApp", |
||||||
|
"mainAppText": "这是主应用界面。", |
||||||
|
"resetCountry": "重置国家选择", |
||||||
|
"loginTitle": "登录 Brainnel", |
||||||
|
"loginSubtitle": "登录开始您的业务", |
||||||
|
"continueWithGoogle": "使用 Google 继续", |
||||||
|
"continueWithFacebook": "使用 Facebook 继续", |
||||||
|
"continueWithApple": "使用 Apple 继续", |
||||||
|
"continueWithInstagram": "使用 Instagram 继续", |
||||||
|
"continueWithEmail": "使用邮箱继续", |
||||||
|
"continueWithPhone": "使用手机号继续", |
||||||
|
"orContinueWith": "或使用", |
||||||
|
"instagram": "Instagram", |
||||||
|
"email": "邮箱", |
||||||
|
"phone": "手机", |
||||||
|
"forgotPassword": "忘记密码?", |
||||||
|
"termsText": "继续即表示您同意我们的", |
||||||
|
"termsOfUse": "使用条款", |
||||||
|
"and": "和", |
||||||
|
"privacyPolicy": "隐私政策", |
||||||
|
"wholesalePrice": "批发价", |
||||||
|
"fastShipping": "快速配送", |
||||||
|
"shipping": "配送", |
||||||
|
"quote": "报价", |
||||||
|
"tiktok": "抖音", |
||||||
|
"howToBuy": "如何购买", |
||||||
|
"all": "全部", |
||||||
|
"electronics": "电子产品", |
||||||
|
"clothing": "服装", |
||||||
|
"home": "家居", |
||||||
|
"beauty": "美妆", |
||||||
|
"kids": "儿童", |
||||||
|
"logInOrSignUp": "登录或注册", |
||||||
|
"phoneNumber": "手机号码", |
||||||
|
"enterPassword": "请重新输入密码", |
||||||
|
"passwordIncorrect": "密码错误,请确认您的密码。", |
||||||
|
"verificationCodeInfo": "我们将向您的号码发送验证码以确认是您本人。", |
||||||
|
"continue": "继续", |
||||||
|
"pleaseEnterEmail": "请输入您的电子邮箱地址", |
||||||
|
"searchProducts": "搜索商品", |
||||||
|
"priceRange": "价格范围", |
||||||
|
"minPrice": "最低价", |
||||||
|
"maxPrice": "最高价", |
||||||
|
"reset": "重置", |
||||||
|
"apply": "应用", |
||||||
|
"price": "价格", |
||||||
|
"lowToHigh": "从低到高", |
||||||
|
"highToLow": "从高到低", |
||||||
|
"time": "时间", |
||||||
|
"oldest": "最早", |
||||||
|
"newest": "最新", |
||||||
|
"noResults": "未找到结果", |
||||||
|
"tryDifferentKeywords": "请尝试使用不同的关键词或检查拼写", |
||||||
|
"loadingMore": "加载更多...", |
||||||
|
"noMoreData": "没有更多数据", |
||||||
|
"monthlySales": "月销量", |
||||||
|
"search": "搜索", |
||||||
|
"searchPlaceholder": "搜索商品", |
||||||
|
"cancel": "取消", |
||||||
|
"searchHistory": "搜索历史", |
||||||
|
"hotSearch": "热门搜索", |
||||||
|
"noRecentSearches": "您没有最近的搜索记录", |
||||||
|
"headphones": "耳机", |
||||||
|
"computer": "电脑", |
||||||
|
"tablet": "平板", |
||||||
|
"watch": "手表", |
||||||
|
"camera": "相机", |
||||||
|
"homeAppliance": "家用电器", |
||||||
|
"food": "食品", |
||||||
|
"summerWomenClothes": "夏季女装", |
||||||
|
"plusSizeWomen": "大码女装", |
||||||
|
"sexyUnderwear": "性感内衣", |
||||||
|
"homeDecor": "家居装饰", |
||||||
|
"unusualToys": "新奇玩具", |
||||||
|
"productDetail": "商品详情", |
||||||
|
"addToCart": "加入购物车", |
||||||
|
"buyNow": "立即购买", |
||||||
|
"color": "颜色", |
||||||
|
"size": "尺寸", |
||||||
|
"moreFromStore": "更多来自该店铺", |
||||||
|
"viewAll": "查看全部", |
||||||
|
"loadingProductInfo": "正在加载商品信息...", |
||||||
|
"productNotAvailable": "商品不可用或已被移除", |
||||||
|
"customerService": "客服", |
||||||
|
"productDetails": "商品详情", |
||||||
|
"loadingMoreProducts": "正在加载更多商品...", |
||||||
|
"noMoreProducts": "没有更多商品", |
||||||
|
"chatNow": "立即聊天", |
||||||
|
"popularCategories": "热门分类", |
||||||
|
"setting": { |
||||||
|
"title": "选择语言和货币", |
||||||
|
"country": "国家", |
||||||
|
"currency": "货币", |
||||||
|
"language": "语言", |
||||||
|
"confirm": "确认", |
||||||
|
"success": "设置成功" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
import { i18n } from 'i18next'; |
||||||
|
|
||||||
|
declare global { |
||||||
|
interface Window { |
||||||
|
i18n: i18n; |
||||||
|
} |
||||||
|
|
||||||
|
const t: (key: string, options?: any) => string; |
||||||
|
}
|
@ -0,0 +1,27 @@ |
|||||||
|
import { getCurrentLanguage } from '../i18n'; |
||||||
|
|
||||||
|
export const getSystemLanguage = <T extends Record<string, any>>(data: T): string => { |
||||||
|
// 获取当前i18n语言
|
||||||
|
const currentLang = getCurrentLanguage(); |
||||||
|
|
||||||
|
// 特殊处理中文
|
||||||
|
if (currentLang === 'zh' && 'subject' in data) { |
||||||
|
return data.subject as string; |
||||||
|
} |
||||||
|
|
||||||
|
// 获取所有subject_trans开头的字段
|
||||||
|
const translationFields = Object.keys(data).filter(key =>
|
||||||
|
key.startsWith('subject_trans') |
||||||
|
); |
||||||
|
|
||||||
|
// 查找匹配的字段
|
||||||
|
const matchedField = translationFields.find(field => { |
||||||
|
// 从字段名中提取语言代码
|
||||||
|
const langCode = field.replace('subject_trans_', ''); |
||||||
|
// 如果没有后缀,则为法语
|
||||||
|
return langCode === '' ? currentLang === 'fr' : langCode === currentLang; |
||||||
|
}); |
||||||
|
|
||||||
|
// 返回匹配的翻译值,如果没有匹配则返回法语
|
||||||
|
return (data[matchedField || 'subject_trans'] as string) || ''; |
||||||
|
}; |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 57 KiB |
Loading…
Reference in new issue