mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
f6ccb163aa
E2E tests passed locally **Added `readme.md` to the example code** This explains how to build and run the example for both English and French. **Archived `i18n-optional-manual-runtime-locale.md`** I was asked to cut out a substantial swath of this page by reviewer "zip-fa". All that remained was a brief paragraph. I removed the page from the navigation after copying the remaining text to `i18n-optional-import-global-variants.md`. The page is still reachable by 3rd party links. PR Close #51589
27 lines
865 B
Markdown
27 lines
865 B
Markdown
# Angular i18n Internationalization Example
|
|
|
|
This sample comes from the Angular documentation's "[Example Angular Internationalization application](https://angular.io/guide/i18n-example)" page.
|
|
|
|
## Install and Run the Download
|
|
|
|
1. `npm install` the node_module packages
|
|
2. `npm start` to see it run in English
|
|
3. `npm run start:fr` to see it run with French translation.
|
|
|
|
>See the scripts in `package.json` for an explanation of these commands.
|
|
|
|
|
|
## Run in Stackblitz
|
|
|
|
Stackblitz compiles and runs the English version by default.
|
|
|
|
To see the example translate to French with Angular i18n:
|
|
|
|
1. Open the `project.json` file and add the following to the bottom:
|
|
```
|
|
, "stackblitz": {
|
|
"startCommand": "npm run start:fr"
|
|
}
|
|
```
|
|
|
|
2. Click the "Fork" button in the stackblitz header. That makes a new copy for you with this change and re-runs the example in French. |