This project is the source code of a tutorial on how to internationalize and Localize your Ionic application by making use of Angular Translate, Angular Dynamic Locale and Cordova Globalization Plugin.
The complete tutorial is published on Medium.
Run npm install
to install all needed dependencies
Run bower install
to install all needed dependencies.
Use grunt serve -l
to run the app in browser and watch for changes in code
or
use grunt serve
to just run the app for a browser preview
or
use grunt serve --lab
to run the app in a browser on two platforms at the same time.
$ grunt platform:add:<platform>
Supported Cordova platforms:
$ grunt platform:add:ios
$ grunt platform:add:android
$ grunt build
iOS:
$ grunt emulate:ios
Android:
$ grunt emulate:android
For more information, see Ionic Framework Generator's instructions.
Localization files can be found in Angular's directory. Any downloaded locale should be included in the app/locales
folder.
Use the following commands and install the plugin required by the app:
$ cordova plugin add com.keosu.cordova.stream
or
$ cordova plugin add https://github.com/keosuofficial/cordova-audio-stream-plugin.git
In case that the required Cordova plugins are not installed while installing NodeJS dependencies, Cordova's command mentioned previously can be used to install the following plugins:
- cordova-plugin-globalization - It obtains information and performs operations specific to the user's locale and timezone.
A production ready i18n Ionic application which demonstrates and extends everything that is described in this tutorial is available in Codecanyon. i18n Ionic is ideal as a point of reference to give your applications the internationalized boost they need.