question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update i18n doc with loadTranslations and $localize

See original GitHub issue

πŸ“š Docs or angular.io bug report

Description

Issue first reported in https://github.com/angular/angular/issues/35776. Related issue about length of document: https://github.com/angular/angular/issues/33461

Developers want the following:

Please add docs for loadTranslations and clearTranslations. Use i18n for library in ng-packagr.

πŸ”¬ Minimal Reproduction

What’s the affected URL?**

https://angular.io/guide/i18n#internationalization-i18n

Reproduction Steps**

Expected vs Actual Behavior**

Some of this content requires a description of $localize, which is not a public API yet.

Doc team wants to separate the i18n doc into 3 separate docs:

Task: Translating templates for different locales

  • Format data based on locale using pipes
  • Prepare templates for translations
  • Extract and work with translation files
  • Mark plurals and alternates for translation
  • Translate plurals and alternate expressions
  • See comment in PR about ICU expressions

Task: Localizing your app

  • Set up localization
  • Merge translations with the app
  • Inline at compile-time
  • Runtime ?
  • Merge translated libraries used in the app
  • Deploy app for multiple locales

Tutorial: Using $localize in your app

  • Step-by-step tutorial

Other docs that need updating:

For details, see the i18n Documentation Plan.

πŸ“·Screenshot

πŸ”₯ Exception or Error





🌍 Your Environment

Browser info

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:12
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
michaelfaithcommented, Jul 24, 2021

Would love to have more documentation on this. Especially handling runtime localization and about building libraries with translations.

1reaction
petebacondarwincommented, Feb 12, 2021

You are basically right in your first description of this issue. This whole area is not documented well (or at all). Hopefully #40317 will begin to resolve this. But we do need to add more to the guides.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular i18n: internationalization & localization with examples
Angular I18n uses the built-in module for internationalization. Learn how to set up I18n, perform translations, and deploy the app.
Read more >
loadTranslations - Angular
Note that $localize messages are only processed once, when the tagged string is first encountered, and does not provide dynamic language changing withoutΒ ......
Read more >
Add or Load Translations - i18next documentation
There are a few options to load translations to your application instrumented by i18next. The most common approach to this adding a so...
Read more >
Maintaining Multi-language Angular Applications with i18n
Angular i18n and the localizing (l10n) of applications had an overhaul with version 9, ... Updates package.json and installs the package.
Read more >
Adding Internationalization to Angular - GlitchTip
It's not clear from Localize's documentation that it supports runtime translation. It has partial support through the usage of loadTranslations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found