How to serve different Angular locales during development using ng serve?

后端 未结 1 1585
庸人自扰
庸人自扰 2021-02-14 07:27

I\'m developing an app in two different languages (fa/en) using Angular Internationalization (i18n).

  • The target is to deploy the two different builds into sub-fold
1条回答
  •  無奈伤痛
    2021-02-14 07:41

    In Angular 9 the development server (ng serve) can only be used with a single locale.

    However, you can still serve each locale on different ports by running two separate commands:

    ng serve --configuration=fa --port 4200

    ng serve --configuration=en --port 4201

    Hopefully, they will introduce multiple locale options for development builds in Angular 10

    0 讨论(0)
提交回复
热议问题