SlideShare a Scribd company logo
1 of 16
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

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.pptxGoogleDeveloperStude22
 
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 FloeEric Floe
 
Scintillating
ScintillatingScintillating
ScintillatingESUG
 
NTLM - Open Source Language AI Tools
NTLM - Open Source Language AI ToolsNTLM - Open Source Language AI Tools
NTLM - Open Source Language AI ToolsAravinth 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 meetupShikha 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 platformsReddappa Gowd Bandi
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil 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.pdfKnoldus Inc.
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveBizTalk360
 
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 10Suzanne 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 ServiceRamzi Yassine
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programmingDrRajeshkumarPPatel
 

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

WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024TopCSSGallery
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoUXDXConf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 

Recently uploaded (20)

WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 

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