SlideShare a Scribd company logo
1 of 24
Download to read offline
How to Implement
Internationalization (i18n)
in Angular
Application(Multiple
Language Support with
Example)
www.bacancytechnology.com
I am writing this blog to get you through
one of the easier ways to implement multi-
language support in Angular application,
and if you follow all the instructions that I
am going to discuss in this blog post, then I
am pretty sure that you will have your own
multi-language support Angular
application.
Table of contents:-
(1) What is Internationalization or i18n in
Angular Application?
 (2) What is multi-language support work in
Angular application?
 (3) How to implement Internationalization
in Angular Application?
 (4) Source code of Git repository.
➤ So Internationalization or i18 is a feature
that is provided by the Angular team to
support multi-languages on a website. 
➤ By using Internationalization, users can
change the language and can understand
more about the website content in a
supportive language. 
➤ For more information, you can visit
official
website https://angular.io/guide/i18n
(1) What is
Internationalization or
i18n in Angular
Application?
➤ Multiple language support is to offer
support for different languages on a website
or web page.
 ➤ By which users can change the language,
and some content will be changed based on
language preference.
(2) What is Multi-Language
Support Work in Angular
Application?
➤ Let’s do some practice with the new
Angular project, so before finishing this
blog, you will have a good multi-language
support application ready. 
➤ So first of all, let’s create a new project. 
➤ Here I am using Angular version 9.
(3) How to implement
Internationalization in
Angular Application?
➤ Create a new Angular project by the
below command.
ng new i18n – – routing
➤ Now go to the root folder and run this
project and check on localhost:4200 in a
browser
cd i18n
ng serve -o
So let’s start with creating components and
set routing with a nice bootstrap header for
redirection to the different pages.
Go to the terminal and create 3 components
ng g c profile
ng g c blog
ng g c certificate
It will create 3 components with HTML,
CSS, spec and ts files.
Now go to the app-routing.module.ts file
and set the routing as shown in the below
image.
Now create a good bootstrap header in
app.component.html and app.component.ts
file like, below image.
Note: – I have used bootstrap CDN for some
design purpose, so you need to add CDN in
index.html file or to use package.json as per
your choice, or you can use your own CSS
for the header.
And now, if you run this project, then its
output is something like the below image.
I hope your Angular project is running
without any error, so now we can start to
implement internalization in this project.
So in this project, we are going to add 3
languages support, which are English,
Hindi, and Gujarati, and for that, we need to
create 3 JSON files that refer to those
languages, and then we will use that file in
our project for language support.
So first, go to the assets folder which is
inside the src/assets and create 1 folder
named i18n and inside that create a 3
language JSON file with some key-value
pair as I show in the images below…
(1) English.json
(2) Hindi.json
(3) Gujarati.json
Now we need to install 2 dependencies by
using the below command.
npm install @ngx-translate/core @ngx-
translate/http-loader
So now we need to use TranslateModule,
TranslateLoader from @ngx-translate/core,
and TranslateHttpLoader from @ngx-
translate/HTTP-loader in app.module.ts for
configuration of the language-translation.
As I show in the below image, we need to
create a
function “createTranslateLoader” and need
to add in an import array as well for
configuration of the language JSON files,
which we created earlier.
As we are using HTTP so we will be required
to import HttpClientModule as well in the
app.module.ts file, as shown in the above
image.
Now we are almost ready to show the
different languages.
First, we need to set the default language in
a constructor of app.component.ts file as
shown in the below image.
-> this.translate.use(‘English’);
Now select the different languages we need
to set in a translation.
We need to create a method and set it to the
dropdown language select in
app.component.html and app.component.ts
file just like below image
Now the central part comes into the picture.
Where precisely, we want to show the
different languages we need to use a
translation pipe, just like in the image
below.
In the above image, you can see that we
replace Profile to {{‘header.profile’ |
translate}}, so basically header and profile is
a key in the language JSON file like.
So if we want to show “Welcome to the
profile page.” then we need to do something
like.
So now we are done with internalization or
i18n or Multi-language support in our
Angular project.
You can save all the changes and run this
project on the browser, and you will see the
changes.
Output Video link:-
https://drive.google.com/file/d/1kUmjbv6B
xeapvn2Qx0MEBL5XWF5xjXRy/view?
usp=sharing
Github:- https://github.com/parthsardhara/
NG-Internationalization-i18n
Project Setup:-
⦿ Clone this project using the below
command. 
⦾git clone 
https://github.com/parthsardhara/NG-
Internationalization-i18n.git
 ⦿Go to the project root folder. 
⦾ cd NG-Internationalization-i18n 
⦿Install node modules dependency by 
⦾ npm install 
⦿Run this project by 
⦾ ng serve or ng s 
⦿ Go to the browser and check on
localhost:4200
(4) Source code of Git
repository.
I hope you have enjoyed reading this blog
post. If you are looking for a helping hand to
build Angular application with
Internationalization (I18N) or looking for
support with your existing app, then get in
touch with us to integrate skilled and
seasoned Angular developers into your
existing team. We are a top-rated Angular
appliaction development company, offering
the best Angular development services and
also let you hire dedicated Angular
application developers at your convenience
engagement model.
Wrapping Up
Thank You

More Related Content

What's hot

webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slidesmattysmith
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorialMohammed Fazuluddin
 
The virtual DOM and how react uses it internally
The virtual DOM and how react uses it internallyThe virtual DOM and how react uses it internally
The virtual DOM and how react uses it internallyClóvis Neto
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3 ArezooKmn
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSHoang Long
 
State management in react applications (Statecharts)
State management in react applications (Statecharts)State management in react applications (Statecharts)
State management in react applications (Statecharts)Tomáš Drenčák
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hookPiyush Jamwal
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentationritika1
 
Important React Hooks
Important React HooksImportant React Hooks
Important React HooksKnoldus Inc.
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjsmanojbkalla
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Edureka!
 

What's hot (20)

Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slides
 
React hooks
React hooksReact hooks
React hooks
 
React Hooks
React HooksReact Hooks
React Hooks
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
 
The virtual DOM and how react uses it internally
The virtual DOM and how react uses it internallyThe virtual DOM and how react uses it internally
The virtual DOM and how react uses it internally
 
Workshop 21: React Router
Workshop 21: React RouterWorkshop 21: React Router
Workshop 21: React Router
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
State management in react applications (Statecharts)
State management in react applications (Statecharts)State management in react applications (Statecharts)
State management in react applications (Statecharts)
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hook
 
VueJS: The Simple Revolution
VueJS: The Simple RevolutionVueJS: The Simple Revolution
VueJS: The Simple Revolution
 
Reactjs
ReactjsReactjs
Reactjs
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
Important React Hooks
Important React HooksImportant React Hooks
Important React Hooks
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjs
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 

Similar to How to implement internationalization (i18n) in angular application(multiple language support with example

Oracle User Productiviy Kit
Oracle User Productiviy KitOracle User Productiviy Kit
Oracle User Productiviy KitLarry Sherrod
 
Web application development process
Web application development processWeb application development process
Web application development processJohn Smith
 
Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfJohnLeo57
 
Introduction To Angular 4 - J2I
Introduction To Angular 4 - J2IIntroduction To Angular 4 - J2I
Introduction To Angular 4 - J2INader Debbabi
 
Internship Presentation 1 Web Developer
Internship Presentation 1 Web DeveloperInternship Presentation 1 Web Developer
Internship Presentation 1 Web DeveloperHemant Sarthak
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by CitytechRitwik Das
 
Angular version 10 is here check out the new features, notable changes, depr...
Angular version 10 is here  check out the new features, notable changes, depr...Angular version 10 is here  check out the new features, notable changes, depr...
Angular version 10 is here check out the new features, notable changes, depr...Katy Slemon
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Manoj Ellappan
 
#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...
#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...
#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...Agile Testing Alliance
 
Eo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5eEo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5eGina Bullock
 
Eo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5eEo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5eGina Bullock
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshareSaleemMalik52
 

Similar to How to implement internationalization (i18n) in angular application(multiple language support with example (20)

Angular
AngularAngular
Angular
 
How Does Angular Work?
How Does Angular Work?How Does Angular Work?
How Does Angular Work?
 
Oracle User Productiviy Kit
Oracle User Productiviy KitOracle User Productiviy Kit
Oracle User Productiviy Kit
 
Web application development process
Web application development processWeb application development process
Web application development process
 
Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdf
 
Introduction To Angular 4 - J2I
Introduction To Angular 4 - J2IIntroduction To Angular 4 - J2I
Introduction To Angular 4 - J2I
 
Internship Presentation 1 Web Developer
Internship Presentation 1 Web DeveloperInternship Presentation 1 Web Developer
Internship Presentation 1 Web Developer
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
 
Diving deep in compose.pdf
Diving deep in compose.pdfDiving deep in compose.pdf
Diving deep in compose.pdf
 
Automatic documentation with mule
Automatic documentation with mule Automatic documentation with mule
Automatic documentation with mule
 
Angular version 10 is here check out the new features, notable changes, depr...
Angular version 10 is here  check out the new features, notable changes, depr...Angular version 10 is here  check out the new features, notable changes, depr...
Angular version 10 is here check out the new features, notable changes, depr...
 
presentaion.pptx
presentaion.pptxpresentaion.pptx
presentaion.pptx
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
 
Progressive Web Apps - deep dive
Progressive Web Apps - deep diveProgressive Web Apps - deep dive
Progressive Web Apps - deep dive
 
XCode8.0
XCode8.0XCode8.0
XCode8.0
 
#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...
#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...
#ATAGTR2019 Presentation "iOS App Automation, GitHub and Jenkins integration"...
 
Eo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5eEo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5e
 
Eo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5eEo gaddis java_chapter_14_5e
Eo gaddis java_chapter_14_5e
 
Angular_I18N.pptx
Angular_I18N.pptxAngular_I18N.pptx
Angular_I18N.pptx
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 

More from Katy Slemon

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfKaty Slemon
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfKaty Slemon
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfKaty Slemon
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfKaty Slemon
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfKaty Slemon
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfKaty Slemon
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfKaty Slemon
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfKaty Slemon
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfKaty Slemon
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfKaty Slemon
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfKaty Slemon
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfKaty Slemon
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfKaty Slemon
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfNew Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfKaty Slemon
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfKaty Slemon
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfKaty Slemon
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfKaty Slemon
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfKaty Slemon
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfKaty Slemon
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfKaty Slemon
 

More from Katy Slemon (20)

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfNew Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdf
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 

How to implement internationalization (i18n) in angular application(multiple language support with example

  • 1. How to Implement Internationalization (i18n) in Angular Application(Multiple Language Support with Example) www.bacancytechnology.com
  • 2. I am writing this blog to get you through one of the easier ways to implement multi- language support in Angular application, and if you follow all the instructions that I am going to discuss in this blog post, then I am pretty sure that you will have your own multi-language support Angular application. Table of contents:- (1) What is Internationalization or i18n in Angular Application?  (2) What is multi-language support work in Angular application?  (3) How to implement Internationalization in Angular Application?  (4) Source code of Git repository.
  • 3. ➤ So Internationalization or i18 is a feature that is provided by the Angular team to support multi-languages on a website.  ➤ By using Internationalization, users can change the language and can understand more about the website content in a supportive language.  ➤ For more information, you can visit official website https://angular.io/guide/i18n (1) What is Internationalization or i18n in Angular Application?
  • 4. ➤ Multiple language support is to offer support for different languages on a website or web page.  ➤ By which users can change the language, and some content will be changed based on language preference. (2) What is Multi-Language Support Work in Angular Application?
  • 5. ➤ Let’s do some practice with the new Angular project, so before finishing this blog, you will have a good multi-language support application ready.  ➤ So first of all, let’s create a new project.  ➤ Here I am using Angular version 9. (3) How to implement Internationalization in Angular Application?
  • 6. ➤ Create a new Angular project by the below command. ng new i18n – – routing ➤ Now go to the root folder and run this project and check on localhost:4200 in a browser cd i18n ng serve -o
  • 7. So let’s start with creating components and set routing with a nice bootstrap header for redirection to the different pages. Go to the terminal and create 3 components ng g c profile ng g c blog ng g c certificate It will create 3 components with HTML, CSS, spec and ts files. Now go to the app-routing.module.ts file and set the routing as shown in the below image.
  • 8. Now create a good bootstrap header in app.component.html and app.component.ts file like, below image.
  • 9. Note: – I have used bootstrap CDN for some design purpose, so you need to add CDN in index.html file or to use package.json as per your choice, or you can use your own CSS for the header.
  • 10. And now, if you run this project, then its output is something like the below image.
  • 11. I hope your Angular project is running without any error, so now we can start to implement internalization in this project. So in this project, we are going to add 3 languages support, which are English, Hindi, and Gujarati, and for that, we need to create 3 JSON files that refer to those languages, and then we will use that file in our project for language support. So first, go to the assets folder which is inside the src/assets and create 1 folder named i18n and inside that create a 3 language JSON file with some key-value pair as I show in the images below…
  • 15. Now we need to install 2 dependencies by using the below command. npm install @ngx-translate/core @ngx- translate/http-loader So now we need to use TranslateModule, TranslateLoader from @ngx-translate/core, and TranslateHttpLoader from @ngx- translate/HTTP-loader in app.module.ts for configuration of the language-translation. As I show in the below image, we need to create a function “createTranslateLoader” and need to add in an import array as well for configuration of the language JSON files, which we created earlier.
  • 16.
  • 17. As we are using HTTP so we will be required to import HttpClientModule as well in the app.module.ts file, as shown in the above image. Now we are almost ready to show the different languages. First, we need to set the default language in a constructor of app.component.ts file as shown in the below image. -> this.translate.use(‘English’);
  • 18. Now select the different languages we need to set in a translation. We need to create a method and set it to the dropdown language select in app.component.html and app.component.ts file just like below image
  • 19. Now the central part comes into the picture. Where precisely, we want to show the different languages we need to use a translation pipe, just like in the image below.
  • 20. In the above image, you can see that we replace Profile to {{‘header.profile’ | translate}}, so basically header and profile is a key in the language JSON file like.
  • 21. So if we want to show “Welcome to the profile page.” then we need to do something like. So now we are done with internalization or i18n or Multi-language support in our Angular project. You can save all the changes and run this project on the browser, and you will see the changes. Output Video link:- https://drive.google.com/file/d/1kUmjbv6B xeapvn2Qx0MEBL5XWF5xjXRy/view? usp=sharing
  • 22. Github:- https://github.com/parthsardhara/ NG-Internationalization-i18n Project Setup:- ⦿ Clone this project using the below command.  ⦾git clone  https://github.com/parthsardhara/NG- Internationalization-i18n.git  ⦿Go to the project root folder.  ⦾ cd NG-Internationalization-i18n  ⦿Install node modules dependency by  ⦾ npm install  ⦿Run this project by  ⦾ ng serve or ng s  ⦿ Go to the browser and check on localhost:4200 (4) Source code of Git repository.
  • 23. I hope you have enjoyed reading this blog post. If you are looking for a helping hand to build Angular application with Internationalization (I18N) or looking for support with your existing app, then get in touch with us to integrate skilled and seasoned Angular developers into your existing team. We are a top-rated Angular appliaction development company, offering the best Angular development services and also let you hire dedicated Angular application developers at your convenience engagement model. Wrapping Up