SlideShare a Scribd company logo
I n t e r n a t i o n a l i z a t i o n
I n
A n g u l a r
ANKIT SHARMA PRESENTS
• SDE III at Cisco Systems, India
• Author & Speaker
• GDE for Angular, Microsoft MVP
• Blog https://ankitsharmablogs.com/
Ankit
in/ankitsharma-007 @ankitsharma_007
What is Internationalization?
• Internationalization – the process of designing and preparing
your project for use in different locales around the world.
• A locale identifies a region in which people speak a particular
language or language variant.
in/ankitsharma-007 @ankitsharma_007
What is Internationalization?
• Shorthand – I18N
in/ankitsharma-007 @ankitsharma_007
What is Localization?
• Localization is the process of building versions of your project
for different locales.
• We need to apply internationalization to the application and
after that we can localize it.
• Localization allows us to serve our application in different
languages.
• Shorthand – L10N
in/ankitsharma-007 @ankitsharma_007
Add the localize package
• We will add the @angular/localize package to our project. It
will allow us to use the localization features provided by
Angular.
in/ankitsharma-007 @ankitsharma_007
The i18n Attribute
• The Angular framework provides us with the i18n attribute,
which can be used to mark an HTML element for translation.
in/ankitsharma-007 @ankitsharma_007
The i18n Attribute
• We can add a description to the i18n attribute which will
provide additional information or context for the translator.
in/ankitsharma-007 @ankitsharma_007
The i18n Attribute
• If you want to translate an attribute of an HTML tag, then
you can use the i18n attribute as i18n-x, where x is the name
of the HTML attribute you wish to translate.
in/ankitsharma-007 @ankitsharma_007
Translation in the component
code
• We can use the global constant, $localize to translate strings
in the component code.
in/ankitsharma-007 @ankitsharma_007
Create a Translation Source File
• After preparing the template file for translation, we will
extract the text marked for translation to a Translation
Source File.
in/ankitsharma-007 @ankitsharma_007
Create a Translation Source File
• It will create a folder called translate inside the src folder and
create a messages.xlf file inside it.
• The --output-path option is used to set the output path for
the generated translation file.
in/ankitsharma-007 @ankitsharma_007
Serve App in Multiple
Languages
• Make the following changes in the angular.json file
• Configure the locale and the path of translated file.
• Configuration for locale definition in the build configuration.
• Apply specific build options for each locale.
in/ankitsharma-007 @ankitsharma_007
Execute in Local Env
• We can use only one locale at a time while executing the app
in the local environment.
• Run the following command to execute the app in local
environment for French language.
in/ankitsharma-007 @ankitsharma_007
Demo Time !!!
in/ankitsharma-007 @ankitsharma_007
Resources
• Scan QR for GitHub repo
• https://ankitsharmablogs.com/
• https://angular.io/guide/i18n-overview
in/ankitsharma-007 @ankitsharma_007

More Related Content

Similar to Angular_I18N.pptx

I18n
I18nI18n
solution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxsolution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptx
GoogleDeveloperStude22
 
Localization
LocalizationLocalization
Localization
Ankur Gupta
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
Thapar Institute
 
Thinking tts - Eric Floe
Thinking tts - Eric FloeThinking tts - Eric Floe
Thinking tts - Eric Floe
Eric Floe
 
Scintillating
ScintillatingScintillating
Scintillating
ESUG
 
Angular IO
Angular IOAngular IO
Angular IO
Jennifer Estrada
 
NTLM - Open Source Language AI Tools
NTLM - Open Source Language AI ToolsNTLM - Open Source Language AI Tools
NTLM - Open Source Language AI Tools
Aravinth Bheemaraj
 
Eric grover strategies for sharing code with windows 8 and windows phone 8 ...
Eric grover   strategies for sharing code with windows 8 and windows phone 8 ...Eric grover   strategies for sharing code with windows 8 and windows phone 8 ...
Eric grover strategies for sharing code with windows 8 and windows phone 8 ...
Eric Grover
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetupKibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
Shikha Srivastava
 
I18n design approach for global enterprise platforms
I18n design approach for global enterprise platformsI18n design approach for global enterprise platforms
I18n design approach for global enterprise platforms
Reddappa Gowd Bandi
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
Akhil Kaushik
 
Animation Framework with Internationalization (I18n)
Animation Framework with Internationalization (I18n)Animation Framework with Internationalization (I18n)
Animation Framework with Internationalization (I18n)
IRJET Journal
 
The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)
Eugenio Minardi
 
Angular Material Design.pdf
Angular Material Design.pdfAngular Material Design.pdf
Angular Material Design.pdf
Knoldus Inc.
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
BizTalk360
 
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
Suzanne Dergacheva
 
AIM | HDC 2016 Globalization As a Service
AIM | HDC 2016 Globalization As a ServiceAIM | HDC 2016 Globalization As a Service
AIM | HDC 2016 Globalization As a Service
Ramzi Yassine
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programming
DrRajeshkumarPPatel
 
Class_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdfClass_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdf
SanjeedaPraween
 

Similar to Angular_I18N.pptx (20)

I18n
I18nI18n
I18n
 
solution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxsolution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptx
 
Localization
LocalizationLocalization
Localization
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Thinking tts - Eric Floe
Thinking tts - Eric FloeThinking tts - Eric Floe
Thinking tts - Eric Floe
 
Scintillating
ScintillatingScintillating
Scintillating
 
Angular IO
Angular IOAngular IO
Angular IO
 
NTLM - Open Source Language AI Tools
NTLM - Open Source Language AI ToolsNTLM - Open Source Language AI Tools
NTLM - Open Source Language AI Tools
 
Eric grover strategies for sharing code with windows 8 and windows phone 8 ...
Eric grover   strategies for sharing code with windows 8 and windows phone 8 ...Eric grover   strategies for sharing code with windows 8 and windows phone 8 ...
Eric grover strategies for sharing code with windows 8 and windows phone 8 ...
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetupKibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
 
I18n design approach for global enterprise platforms
I18n design approach for global enterprise platformsI18n design approach for global enterprise platforms
I18n design approach for global enterprise platforms
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Animation Framework with Internationalization (I18n)
Animation Framework with Internationalization (I18n)Animation Framework with Internationalization (I18n)
Animation Framework with Internationalization (I18n)
 
The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)
 
Angular Material Design.pdf
Angular Material Design.pdfAngular Material Design.pdf
Angular Material Design.pdf
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
 
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
 
AIM | HDC 2016 Globalization As a Service
AIM | HDC 2016 Globalization As a ServiceAIM | HDC 2016 Globalization As a Service
AIM | HDC 2016 Globalization As a Service
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programming
 
Class_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdfClass_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdf
 

Recently uploaded

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 

Recently uploaded (20)

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 

Angular_I18N.pptx

  • 1. I n t e r n a t i o n a l i z a t i o n I n A n g u l a r ANKIT SHARMA PRESENTS
  • 2. • SDE III at Cisco Systems, India • Author & Speaker • GDE for Angular, Microsoft MVP • Blog https://ankitsharmablogs.com/ Ankit in/ankitsharma-007 @ankitsharma_007
  • 3. What is Internationalization? • Internationalization – the process of designing and preparing your project for use in different locales around the world. • A locale identifies a region in which people speak a particular language or language variant. in/ankitsharma-007 @ankitsharma_007
  • 4. What is Internationalization? • Shorthand – I18N in/ankitsharma-007 @ankitsharma_007
  • 5. What is Localization? • Localization is the process of building versions of your project for different locales. • We need to apply internationalization to the application and after that we can localize it. • Localization allows us to serve our application in different languages. • Shorthand – L10N in/ankitsharma-007 @ankitsharma_007
  • 6. Add the localize package • We will add the @angular/localize package to our project. It will allow us to use the localization features provided by Angular. in/ankitsharma-007 @ankitsharma_007
  • 7. The i18n Attribute • The Angular framework provides us with the i18n attribute, which can be used to mark an HTML element for translation. in/ankitsharma-007 @ankitsharma_007
  • 8. The i18n Attribute • We can add a description to the i18n attribute which will provide additional information or context for the translator. in/ankitsharma-007 @ankitsharma_007
  • 9. The i18n Attribute • If you want to translate an attribute of an HTML tag, then you can use the i18n attribute as i18n-x, where x is the name of the HTML attribute you wish to translate. in/ankitsharma-007 @ankitsharma_007
  • 10. Translation in the component code • We can use the global constant, $localize to translate strings in the component code. in/ankitsharma-007 @ankitsharma_007
  • 11. Create a Translation Source File • After preparing the template file for translation, we will extract the text marked for translation to a Translation Source File. in/ankitsharma-007 @ankitsharma_007
  • 12. Create a Translation Source File • It will create a folder called translate inside the src folder and create a messages.xlf file inside it. • The --output-path option is used to set the output path for the generated translation file. in/ankitsharma-007 @ankitsharma_007
  • 13. Serve App in Multiple Languages • Make the following changes in the angular.json file • Configure the locale and the path of translated file. • Configuration for locale definition in the build configuration. • Apply specific build options for each locale. in/ankitsharma-007 @ankitsharma_007
  • 14. Execute in Local Env • We can use only one locale at a time while executing the app in the local environment. • Run the following command to execute the app in local environment for French language. in/ankitsharma-007 @ankitsharma_007
  • 16. Resources • Scan QR for GitHub repo • https://ankitsharmablogs.com/ • https://angular.io/guide/i18n-overview in/ankitsharma-007 @ankitsharma_007