You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,73 @@ export class MyApp {
124
124
}
125
125
```
126
126
127
+
## Internationalisation Support
128
+
129
+
The service uses [ng2-translate](https://www.npmjs.com/package/ng2-translate) to support languages other than English. This package is the way [recommended](https://ionicframework.com/docs/v2/resources/ng2-translate/) by the Ionic developers.
130
+
131
+
### With Built in translations
132
+
133
+
To make life easy for app developers, the service includes its own translation strings. All you need to do is add `ng2-translate` to your Ionic app and set the active language.
134
+
135
+
Languages supported are currently limited to English and a Google Translated Spanish. We would love pull requests for new languages.
Note: This is an absolute bare minimum example of loading the module. Follow the instructions linked to above for how to use `ng2-translate` in your app.
149
+
150
+
### With your own strings
151
+
152
+
If you want to further customise the messages, you can provide your own translations for the ManUp strings. _This is the only way we will be supporting customisation of the messages_.
153
+
154
+
#### Setup your language files
155
+
156
+
Follow the instructions for setting up `ng2-translate` with your Ionic 2 app, and add the following tree to your language files:
157
+
158
+
159
+
```json
160
+
{
161
+
...
162
+
163
+
"manup": {
164
+
"mandatory": {
165
+
"title": "Update Required",
166
+
"text": "An update to {{app}} is required to continue."
167
+
},
168
+
"optional": {
169
+
"title": "Update Available",
170
+
"text": "An update to {{app}} is available. Would you like to update?"
171
+
},
172
+
"maintenance": {
173
+
"title": "{app}} Unavailable",
174
+
"text": "{{app}} is currently unavailable, please check back again later."
175
+
},
176
+
"buttons": {
177
+
"update": "Update",
178
+
"later": "Not Now"
179
+
}
180
+
}
181
+
}
182
+
```
183
+
184
+
#### Tell ManUp to use external translations
185
+
186
+
You need to tell ManUp to use external translations. Modify your Bootstrap like this:
0 commit comments