This project was generated with Angular CLI. It is recommended to install packages and run using the node version listed in .nvmrc.
To install dependencies just run:
nvm use # Optional
npm install # Or "npm ci" to make sure that you install the same patch versions as i did
This app uses the api from currencyconvertapi.com
You need to add an API key to the file src/environments/environment.base.ts
You can get a free api key for development here: https://free.currencyconverterapi.com/
Run ng serve
for a dev server. Navigate to http://localhost:4200/en-US/
. The app will automatically reload if you
change any of the source files.
The app will start with locale en-US by default. You can run the german translation with live reload
by: ng serve -c de-DE
Note: For simplicity reasons in this quite simple example there are no unit or e2e tests.
When adding new translations to the english version make sure that you run ng extract-i18n
before build. For editing
translations you can simply open src/locale/translate.babel
with Babel Edit.
Alternatively you can use Matecat or any other CAT Software directly with the XLF files.
Note for translators: For simplicity reasons this app does not provide meaning descriptions within the XLF files.
Run ng build
to build the project. The build artifacts will be stored in the dist/currency-converter
directory.
For each supported locale (en-US, de-DE) you will find one compiled version.
You can build this app as a docker image running NGINX with a preconfigured i18n spa routing. The docker image tag is
configured in package.json
.
Note: For simplicity reasons this NGINX config does not use SSL.
npm run docker:build
# Or directly run at http://localhost it using
npm run docker:run