Skip to content

Commit 12bb202

Browse files
committed
docs: modified guidelines to match transloco
1 parent 3a751c8 commit 12bb202

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

TRANSLATION.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,26 @@
55
The following tasks are required to add a new language.
66
[See available code here](https://github.com/angular/angular/tree/master/packages/common/locales).
77

8-
- Copy production into the configurations section of angular.json to create production build settings for the language.
9-
- Add rewrites for the language to the `rewrites` of `firebase.json`.
10-
- Add languages ​​to the languages ​​in `xliffmerge.json` (And do `yarn i18n`).
8+
- Add word transration file ​​in `src/assets/i18n/[lang-code].json`.
119
- Add languages ​​to `langages`, an array of `tools/utils.ts` files.
12-
- Let's make build environment for language in `build:ssr` in scripts of package.json.
13-
- Register localeData of the language to be added to `app.module.ts` using `registerLocaleData()`.
14-
https://angular.io/guide/i18n#i18n-pipes
15-
- Add a language to the languages propety of `src/app/shared/footer/footer.component.ts`.
10+
- Register langage code of the language to be added to `translocoConfig()` in `src/app/app.module.ts`.
1611
- Make a target language directory by copying `en-US` in the content directory. And then run `yarn build-content`.
1712

1813
Hooray! Now you can choose a new language.
1914

2015
## Do translation
2116

22-
There are two types of translation: translation of the application using angular i18n and translation of the main content composed of markdown.
17+
There are two types of translation: translation of the application using [transloco](https://netbasal.gitbook.io/transloco/) and translation of the main content composed of markdown.
2318

2419
### Application translation
2520

26-
Please read the [angular i18n](https://angular.io/guide/i18n) documentation once.
21+
Please read the [transloco](https://netbasal.gitbook.io/transloco/) documentation once.
2722

28-
Translate the app by editing `src/locale/messages.[language code].xlf`.
29-
It is difficult to edit xlf file manually, so use something like a tool.
30-
31-
Tool Example: https://poedit.net/
23+
Translate the app by editing `src/assets/i18n/[lang-code].json`.
3224

3325
### Translation of content
3426

35-
Translation of content is editing files in the `content/[target lang]` directory.
27+
Translation of content is editing files in the `content/[lang-code]` directory.
3628

3729
You don't have to make all the files at once. but when it's missing it will be displayed in original English.
3830

0 commit comments

Comments
 (0)