SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Similar a 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
 
Lightning Components Explained
Lightning Components ExplainedLightning Components Explained
Lightning Components ExplainedAtul Gupta(8X)
 

Similar a Angular_I18N.pptx (20)

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
 
Lightning Components Explained
Lightning Components ExplainedLightning Components Explained
Lightning Components Explained
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
#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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
#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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

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