We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa731cd commit 1f87483Copy full SHA for 1f87483
2 files changed
src/client.ts
@@ -110,8 +110,7 @@ export class Pushy {
110
this.clientType = clientType || 'Pushy';
111
this.options.server = SERVER_PRESETS[this.clientType];
112
113
- // Initialize i18n based on clientType
114
- i18n.setLocale(this.clientType === 'Pushy' ? 'zh' : 'en');
+ i18n.setLocale(options.locale ?? this.clientType === 'Pushy' ? 'zh' : 'en');
115
116
if (Platform.OS === 'ios' || Platform.OS === 'android') {
117
if (!options.appKey) {
src/type.ts
@@ -86,6 +86,7 @@ export interface ClientOptions {
86
appKey: string;
87
server?: UpdateServerConfig;
88
logger?: UpdateEventsLogger;
89
+ locale?: 'zh' | 'en';
90
updateStrategy?:
91
| 'alwaysAlert'
92
| 'alertUpdateAndIgnoreError'
0 commit comments