AngularJS Internationalization is possible by numbers and dates done internally.
Filter Internationalization
Description
Few of the AngularJS filters gives foundation to internationalization. For example, currency and date filters support for internationalization like below.
[javascript]
{{ theDate | date: 'fullDate' }}
{{ theValue | currency }}
{{ theValue | number }}
[/javascript]
Date Filter
The filter takes the below values defining the way to format the date.
short
medium
shortDate
mediumDate
longDate
fullDate
shortTime
mediumTime
For example,
[javascript]
{{ theDate | date: 'shortDate' }}
{{ theDate | date: 'longDate' }}
[/javascript]
Currency Filter
The currency symbol will be used while performing filter on currency terms depending on the selected locale. For Example,
[javascript]
{{ theValue | currency : '$' }}
{{ theValue | currency : '£' }}
{{ theValue | currency : '€' }}
[/javascript]
Number Filter
This filter prepares numbers depending on the selected locale. For example,
[javascript]
{{ theValue | number }}
[/javascript]
Locale Setting
Description
To initiate locale (language and country) to AngularJs, include the respective AngularJS locale file. Below example shows the way to include the Danish locale.