-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
771654b
commit ace077d
Showing
9 changed files
with
88 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Localization handbook | ||
|
||
[offical react-native-localization](https://yarnpkg.com/package/react-native-localization) | ||
|
||
#### Install Localization package in the project | ||
|
||
```bash | ||
$ yarn add react-native-localization | ||
``` | ||
|
||
#### Usage | ||
|
||
[Example](../src/components/strings/) | ||
|
||
```js | ||
import { Strings } from "./components/strings"; | ||
|
||
<Text style={styles.x}> {Strings.CodePush.ChangeLogs} </Text>; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const en = { | ||
CodePush: { | ||
ChangeLogs: "\n\nChangeLogs:\n\n\n", | ||
AlertTitle: "There is a new update!", | ||
AlertMessage: "Would you like to download the new update?", | ||
AlertBtnInstall: "Download and Restart", | ||
AlertBtnIgnore: "Remind me later", | ||
Status: p => `% ${p} completed.`, | ||
UpdateChecking: "Checking for updates ...", | ||
WaitingAction: "Your permission is pending to start the update.", | ||
UpdateDownloading: "Downloading update ...", | ||
UpdateInstalling: "Installing update ...", | ||
UpToDate: "You are currently using the most current version.", | ||
UpdateCanceled: "The update has been canceled. For the best experience, you should keep your app updated!", | ||
UpdateInstalled: "The installation is complete. The application is restarting.", | ||
UpdateUnknownError: "An unknown error has occurred.", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import LocalizedStrings from "react-native-localization"; | ||
import { tr } from "./tr"; | ||
import { en } from "./en"; | ||
import { it } from "./it"; | ||
|
||
export const Strings = new LocalizedStrings({ en, tr, it }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export const it = { | ||
CodePush: { | ||
ChangeLogs: "\n\nChangeLogs:\n\n\n", | ||
AlertTitle: "C'è un nuovo aggiornamento!", | ||
AlertMessage: "Vuoi scaricare il nuovo aggiornamento?", | ||
AlertBtnInstall: "Scarica e riavvia", | ||
AlertBtnIgnore: "Ricordamelo più tardi", | ||
Status: p => `% ${p} completato.`, | ||
UpdateChecking: "Verifica aggiornamenti ...", | ||
WaitingAction: "La tua autorizzazione è in attesa di avviare l'aggiornamento.", | ||
UpdateDownloading: "Download aggiornamento in corso ...", | ||
UpdateInstalling: "Installazione aggiornamento ...", | ||
UpToDate: "Stai attualmente utilizzando la versione più recente.", | ||
UpdateCanceled: | ||
"L'aggiornamento è stato annullato. Per la migliore esperienza, dovresti mantenere aggiornata la tua app!", | ||
UpdateInstalled: "L'installazione è completa. L'applicazione si sta riavviando.", | ||
UpdateUnknownError: "Si è verificato un errore sconosciuto.", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters