Skip to content

docs(recipes): add "How to use ngx-translate with Locize" recipe#13

Open
adrai wants to merge 2 commits into
CodeAndWeb:mainfrom
adrai:add-locize-recipe
Open

docs(recipes): add "How to use ngx-translate with Locize" recipe#13
adrai wants to merge 2 commits into
CodeAndWeb:mainfrom
adrai:add-locize-recipe

Conversation

@adrai
Copy link
Copy Markdown

@adrai adrai commented May 19, 2026

Adds a Recipe documenting the pattern for loading translations from Locize via provideTranslateHttpLoader, plus pushing missing keys back to the project via a MissingTranslationHandler.

This is a how-to (analogous to the existing "How to handle missing translations" and "Write your own loader" recipes) — it shows how to combine two standard ngx-translate primitives to talk to a CDN-hosted JSON source. No new ngx-translate plugin is introduced; the recipe uses only the v17 provider API (provideTranslateService + provideTranslateHttpLoader + provideMissingTranslationHandler).

Both Locize CDN endpoints are documented:

  • Standard CDN (api.lite.locize.app, BunnyCDN-backed, default for new projects)
  • Pro CDN (api.locize.app, AWS CloudFront-backed)

Locize is maintained by the same team that builds i18next.

A runnable Angular 21 + ngx-translate v17 example using the pattern lives at github.com/locize/ngx-translate-example.

Happy to adjust scope, file location, or wording if a smaller / differently-framed version is preferred.

Documents the pattern for loading translations from Locize via
provideTranslateHttpLoader plus pushing missing keys back via a
MissingTranslationHandler. Covers both Locize CDN endpoints (Standard
api.lite.locize.app and Pro api.locize.app) and links to the runnable
example at github.com/locize/ngx-translate-example.
Copilot AI review requested due to automatic review settings May 19, 2026 10:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new documentation recipe to the Recipes section explaining how to load translations from the Locize CDN using ngx-translate v17’s provider API, and how to optionally push missing keys back via a MissingTranslationHandler.

Changes:

  • New recipe page describing Locize CDN endpoints (Standard vs Pro) and URL structure.
  • Example app.config.ts setup using provideTranslateService + provideTranslateHttpLoader.
  • Example MissingTranslationHandler integration using locizer to add missing keys during development.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/content/docs/30-recipes/09-load-translations-from-locize.md Outdated
The standalone provideTranslateService({...}) call wouldn't compile if
copy-pasted as-is. Mirror the elision style used in
08-handle-missing-translations.md (export const appConfig: ApplicationConfig
with `...` for omitted providers) so the snippet is a valid file scaffold.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants