Skip to content

Commit 14ce93e

Browse files
localize text blank #71
1 parent 612ac6f commit 14ce93e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ import { localize } from "nativescript-localize";
7575
console.log(localize("Hello world !"));
7676
```
7777

78-
### Javascript
78+
### Javascript / XML
79+
7980
#### app.js
8081
```js
8182
const application = require("application");
@@ -96,6 +97,15 @@ const localize = require("nativescript-localize");
9697
console.log(localize("Hello world !"));
9798
```
9899

100+
#### Quirks
101+
⚠️ If you notice translations work on your main XML page, but don't work on a page you
102+
navigate to, then add this little hack to the 'page loaded' function of that new page:
103+
104+
```js
105+
const page = args.object;
106+
page.bindingContext = new Observable();
107+
````
108+
99109
### Vue
100110
#### app.js
101111
```js

0 commit comments

Comments
 (0)