docs(recipes): add "How to use ngx-translate with Locize" recipe#13
Open
adrai wants to merge 2 commits into
Open
docs(recipes): add "How to use ngx-translate with Locize" recipe#13adrai wants to merge 2 commits into
adrai wants to merge 2 commits into
Conversation
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.
There was a problem hiding this comment.
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.tssetup usingprovideTranslateService+provideTranslateHttpLoader. - Example
MissingTranslationHandlerintegration usinglocizerto add missing keys during development.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Recipe documenting the pattern for loading translations from Locize via
provideTranslateHttpLoader, plus pushing missing keys back to the project via aMissingTranslationHandler.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:
api.lite.locize.app, BunnyCDN-backed, default for new projects)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.