config: set default locale to English and update CREEM production URLs
- Change default locale from zh to en for international audience - Update .env.example with production CREEM API URL - Set SUCCESS_URL to meeyao.com/en/store
This commit is contained in:
+5
-2
@@ -120,7 +120,10 @@ ERYAO_APPLE_IAP__SERVER_NOTIFICATIONS_URL=
|
|||||||
############
|
############
|
||||||
# CREEM Payment 配置
|
# CREEM Payment 配置
|
||||||
############
|
############
|
||||||
|
# 生产环境: https://api.creem.io
|
||||||
|
# 测试环境: https://test-api.creem.io
|
||||||
ERYAO_CREEM__API_KEY=
|
ERYAO_CREEM__API_KEY=
|
||||||
ERYAO_CREEM__WEBHOOK_SECRET=
|
ERYAO_CREEM__WEBHOOK_SECRET=
|
||||||
ERYAO_CREEM__BASE_URL=https://test-api.creem.io
|
ERYAO_CREEM__BASE_URL=https://api.creem.io
|
||||||
ERYAO_CREEM__SUCCESS_URL=https://yourdomain.com/store?payment=success
|
# 支付成功后跳转链接,需包含语言前缀
|
||||||
|
ERYAO_CREEM__SUCCESS_URL=https://meeyao.com/en/store?payment=success
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
integrations: [react()],
|
integrations: [react()],
|
||||||
i18n: {
|
i18n: {
|
||||||
locales: ['zh', 'zh_Hant', 'en'],
|
locales: ['en', 'zh', 'zh_Hant'],
|
||||||
defaultLocale: 'zh',
|
defaultLocale: 'en',
|
||||||
routing: {
|
routing: {
|
||||||
prefixDefaultLocale: true,
|
prefixDefaultLocale: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export type Locale = 'zh' | 'zh_Hant' | 'en';
|
export type Locale = 'en' | 'zh' | 'zh_Hant';
|
||||||
export const defaultLocale: Locale = 'zh';
|
export const defaultLocale: Locale = 'en';
|
||||||
export const locales: Locale[] = ['zh', 'zh_Hant', 'en'];
|
export const locales: Locale[] = ['en', 'zh', 'zh_Hant'];
|
||||||
|
|
||||||
export function isValidLocale(locale: string): locale is Locale {
|
export function isValidLocale(locale: string): locale is Locale {
|
||||||
return (locales as readonly string[]).includes(locale);
|
return (locales as readonly string[]).includes(locale);
|
||||||
|
|||||||
Reference in New Issue
Block a user