@@ -64,8 +64,8 @@ export class AppModule { }
64
64
65
65
#### Template
66
66
``` xml
67
- <Label text =" {{ 'Hello world !' | L }}" ></ Label >
68
- <Label text =" {{ 'I am %s' | L:'user name' }}" ></ Label >
67
+ <Label text =" {{ 'Hello world !' | L }}" / >
68
+ <Label text =" {{ 'I am %s' | L:'user name' }}" / >
69
69
```
70
70
71
71
#### Script
@@ -85,8 +85,8 @@ application.setResources({ L: localize });
85
85
86
86
#### Template
87
87
``` xml
88
- <Label text =" {{ L('Hello world !') }}" ></ Label >
89
- <Label text =" {{ L('I am %s', 'user name') }}" ></ Label >
88
+ <Label text =" {{ L('Hello world !') }}" / >
89
+ <Label text =" {{ L('I am %s', 'user name') }}" / >
90
90
```
91
91
92
92
#### Script
@@ -105,7 +105,7 @@ Vue.filter("L", localize);
105
105
```
106
106
107
107
#### Template
108
- ``` xml
108
+ ``` html
109
109
<Label :text =" 'Hello world !'|L" ></Label >
110
110
<Label :text =" 'I am %s'|L('user name')" ></Label >
111
111
```
@@ -167,7 +167,13 @@ Keys starting with `ios.info.plist.` are used to localize iOS properties:
167
167
168
168
### How to change the language dynamically at runtime?
169
169
This plugin uses the native capabilities of each platform, language selection is therefore made by the OS.
170
- There is no plan to implement this feature in the near future.
170
+
171
+ On iOS you can programmatically override this language since plugin version 4.2.0 by doing this:
172
+
173
+ ``` typescript
174
+ import { overrideLocale } from " nativescript-localize/localize" ;
175
+ const localeOverriddenSuccessfully = overrideLocale (" en-GB" ); // or "nl-NL", etc
176
+ ```
171
177
172
178
## Troubleshooting
173
179
### The angular localization pipe does not work when in a modal context
0 commit comments