8000 chore(update-plugins): Wed Aug 2 08:05:36 UTC 2023 · NativeScript/docs-v8@ec5ec50 · GitHub
[go: up one dir, main page]

Skip to content

Commit ec5ec50

Browse files
chore(update-plugins): Wed Aug 2 08:05:36 UTC 2023
1 parent 0a5039c commit ec5ec50

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

plugins/localize.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,34 @@ link: https://raw.githubusercontent.com/NativeScript/plugins/main/packages/local
1212

1313
## Contents
1414

15-
- [Installation](#installation)
16-
- [Use @nativescript/localize](#use-nativescriptlocalize)
17-
- [Localization in NativeScript Core](#localization-in-nativescript-core)
18-
- [Quirks](#quirks)
19-
- [Localization in Angular](#localization-in-angular)
15+
- [@nativescript/localize](#nativescriptlocalize)
16+
- [Contents](#contents)
17+
- [Intro](#intro)
18+
- [Installation](#installation)
19+
- [Use @nativescript/localize](#use-nativescriptlocalize)
20+
- [Localization in NativeScript Core](#localization-in-nativescript-core)
21+
- [Quirks](#quirks)
22+
- [Localization in Angular](#localization-in-angular)
2023
- [Localization in Vue](#localization-in-vue)
21-
- [Localization in Svelte](#localization-in-svelte)
22-
- [Setting the Default Language](#setting-the-default-language)
23-
- [Localizing the Application Name](#localizing-the-application-name)
24-
- [Localizing iOS properties?](#how-to-localize-ios-properties)
24+
- [Localization in Svelte](#localization-in-svelte)
25+
- [Setting the default language](#setting-the-default-language)
26+
- [Localizing the application name](#localizing-the-application-name)
27+
- [File format](#file-format)
28+
- [JSON](#json)
29+
- [Javascript](#javascript)
30+
- [Localizing iOS properties](#localizing-ios-properties)
2531
- [Changing the language dynamically at runtime](#changing-the-language-dynamically-at-runtime)
26-
- [iOS](#ios)
27-
- [Android](#android)
28-
- [File format](#file-format)
29-
- [Troubleshooting](#troubleshooting)
30-
- [Angular localization pipe and the modal context](#the-angular-localization-pipe-and-the-modal-context)
31-
- [Issues with WebView on Android N+](#issues-with-webview-on-android-n)
32-
- [API](#api)
33-
- [localize()](#localize)
34-
- [overrideLocale()](#overridelocale)
35-
- [androidLaunchEventLocalizationHandler()](#androidlauncheventlocalizationhandler)
36-
- [Credits](#credits)
37-
- [License](#license)
32+
- [iOS](#ios)
33+
- [Android](#android)
34+
- [Troubleshooting](#troubleshooting)
35+
- [Angular localization pipe and the modal context](#angular-localization-pipe-and-the-modal-context)
36+
- [Issues with WebView on Android N+](#issues-with-webview-on-android-n)
37+
- [API](#api)
38+
- [localize()](#localize)
39+
- [overrideLocale()](#overridelocale)
40+
- [androidLaunchEventLocalizationHandler()](#androidlauncheventlocalizationhandler)
41+
- [Credits](#credits)
42+
- [License](#license)
3843

3944
## Intro
4045

@@ -337,7 +342,7 @@ On both platforms, after calling `overrideLocale` method, you must ask the user
337342
For Example:
338343

339344
```ts
340-
import { Application } from '@nativescript/core'
345+
import { Application, Utils } from '@nativescript/core'
341346
import { overrideLocale } from '@nativescript/localize'
342347

343348
alert({
@@ -347,9 +352,7 @@ alert({
347352
}).then(() => {
348353
L.localize.overrideLocale(selectedLang)
349354
if (isAndroid) {
350-
;(
351-
Application.android.foregroundActivity || Application.android.startActivity
352-
).finish()
355+
Utils.android.getCurrentActivity().finish()
353356
} else {
354357
exit(0)
355358
}

0 commit comments

Comments
 (0)
0