1.28.0 • Published 10 days ago
@graasp/translations v1.28.0
Graasp Translations
Repo containing translations for graasp.
Using translations in your app
To use translations in your app you should:
- Create the translation config by calling
buildI18n('your_app_name')
and eventually changing the language used withi18next.changeLanguage(new_language)
. - Make sure the namespace you want to use exists. If it does not exist you should create it by following the information in the section bellow
Adding support for a new app
In this section we create a new translation namespace that will contain your app's translations.
- Create a file with constant keys in
src/constants/your_app_name.ts
with the following content:
export const MY_APP_NAME = {
WELCOME_MESSAGE: 'Hello World',
// add more keys here ...
};
- Create a file for each supported language in
src/langs/<language-initials>/your_app_name.ts
with the following content:
import { MY_APP_NAME } from "../../constants/your_app_name";
export default {
[MY_APP_NAME.WELCOME_MESSAGE]: 'Hello World',
// other translations here ...
};
- Finally, add your translations to the exising
src/langs/index.ts
file.
Documentation
1.28.0
10 days ago
1.27.0
24 days ago
1.26.0
28 days ago
1.25.3
2 months ago
1.25.2
3 months ago
1.25.0
3 months ago
1.25.1
3 months ago
1.24.0
3 months ago
1.23.0
4 months ago
1.22.1
4 months ago
1.22.0
4 months ago
1.19.0
9 months ago
1.18.1
9 months ago
1.17.2
10 months ago
1.18.0
9 months ago
1.17.1
10 months ago
1.17.0
10 months ago
1.16.1
10 months ago
1.16.0
10 months ago
1.15.1
10 months ago
1.19.4
7 months ago
1.19.3
7 months ago
1.19.2
8 months ago
1.18.3
9 months ago
1.19.1
9 months ago
1.18.2
9 months ago
1.21.0
6 months ago
1.20.1
6 months ago
1.21.1
5 months ago
1.20.0
6 months ago
1.15.0
11 months ago
1.14.0
12 months ago
1.13.0
1 year ago
1.12.0
1 year ago
1.9.0
1 year ago
1.8.0
1 year ago
1.11.0
1 year ago
1.10.0
1 year ago
1.7.0
1 year ago
1.6.0
1 year ago
1.5.0
1 year ago
1.4.0
1 year ago
1.3.0
1 year ago
1.2.1
1 year ago
1.2.0
1 year ago
1.1.0
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago