Multilingual (i18n) in AngularJS

AngularJS provides multi-lingual functions (i18n) with 3 types of filters, currency, date and number. We just need to combine the js corresponding to the location depending on the country. By default it will attach to the location in the web browser.

AngularJS provides multi-lingual functions (i18n) with 3 types of filters, currency, date and number. We just need to combine the js corresponding to the location depending on the country. By default it will attach to the location in the web browser. For example, when using location in Denmark, you use the following script:

 src = "https://code.angularjs.org/1.2.5/i18n/angular-locale_da-dk.js" > 

Example for Danish example in AngularJS

dangonngu.html

 Vi du Da is stupid (i18n) in AngularJS 

 

 Cavalier AngularJS  currency}} 

date}}

number}}

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

Result:

Open the dangonngu.html page in a web browser and see the results.

Picture 1 of Multilingual (i18n) in AngularJS

For example use the location of the Browser

vidui18n.html

 Vi du Da is stupid (i18n) in AngularJS 

 

 Cavalier AngularJS  currency}} 

date}}

number}} src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js" >

Result:

Open the vidui18n.html page in a web browser and see the results.

Picture 2 of Multilingual (i18n) in AngularJS

According to Tutorialspoint

Previous article: The Service in AngularJS

Next lesson: Attribute in C #

Update 25 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile