Internationalizing Application

By default angularjs handles the locale of the browser. For example, to use Danish locale, use following script.
<script src = "https://code.angularjs.org/1.2.5/i18n/angular-locale_da-dk.js"></script> 
Example using Danish locale
snippet
<html>   
<head>
<title>Angular JS Locale</title>
</head>
<body>
<h2>AngularJS Locale</h2>

<div ng-app = "payrollApp" ng-controller = "employeeController">
{{salary | currency }} <br/><br/>
{{joinedOn | date }} <br/><br/>
{{employeeId | number }}
</div>

<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src = "https://code.angularjs.org/1.3.14/i18n/angular-locale_da-dk.js"></script>

<script>
var mainApp = angular.module("mainApp", []);

mainApp.controller('employeeController', function($scope) {
$scope.salary = 4500;
$scope.joinedOn = new Date();
$scope.employeeId = 483387;
});
</script>
</body>
</html>
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 # # # # #