docs(localization): Update localiation topic with new functionality and mark old one as legacy.#6236
docs(localization): Update localiation topic with new functionality and mark old one as legacy.#6236
Conversation
…nd mark old one as legacy.
There was a problem hiding this comment.
Pull request overview
This PR updates the localization documentation to introduce a new recommended localization approach (as of version 20.2.0) while preserving the legacy method. The new approach provides more features with fewer requirements and includes built-in formatting for all locales based on Intl.
Changes:
- Introduced new localization system with
provideIgniteIntl()andsetCurrentI18n()APIs - Added comprehensive documentation for locale settings, formatting options, and resource string management
- Marked the previous localization approach as legacy while keeping it functional
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
| en/components/toc.yml | Marks the localization topic as updated in the table of contents |
| en/components/grids_templates/column-types.md | Adds note about new formatting options and references new localization topic |
| en/components/general/localization.md | Major update: adds new localization section with comprehensive documentation and marks old approach as legacy |
| cspell.json | Adds "subtag" to custom dictionary for spell checking |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| #### Angular API | ||
|
|
||
| You can use also Angular's built in [LOCALE_ID](https://angular.dev/api/core/LOCALE_ID) token the set the locale for the whole application. The tag provided will work the same way for our components compared to how our API handles. |
There was a problem hiding this comment.
The sentence 'The tag provided will work the same way for our components compared to how our API handles' is incomplete. It should be 'how our API handles it' or rephrase for clarity.
| You can use also Angular's built in [LOCALE_ID](https://angular.dev/api/core/LOCALE_ID) token the set the locale for the whole application. The tag provided will work the same way for our components compared to how our API handles. | |
| You can also use Angular's built-in [LOCALE_ID](https://angular.dev/api/core/LOCALE_ID) token to set the locale for the whole application. The tag provided will work the same way for our components as it does when using our API. |
|
|
||
| #### Language and formatting | ||
|
|
||
| If you would like to set different from the global localization for a component, you can do that be setting the `locale` property. The will affect the language of the resource strings used as well as the formatting, since they are tied together. |
There was a problem hiding this comment.
Replace 'The will affect' with 'This will affect' to correct the grammar.
| If you would like to set different from the global localization for a component, you can do that be setting the `locale` property. The will affect the language of the resource strings used as well as the formatting, since they are tied together. | |
| If you would like to set different from the global localization for a component, you can do that be setting the `locale` property. This will affect the language of the resource strings used as well as the formatting, since they are tied together. |
| The appearance of the date portions will be set (e.g. day, month, year) based on [`locale`]({environment:angularApiUrl}/classes/igxgridcomponent.html#locale) format or [`pipeArgs`]({environment:angularApiUrl}/classes/igxcolumncomponent.html#pipeArgs) input. The pipe arguments can be used to specify a custom [date format](https://angular.io/api/common/DatePipe#pre-defined-format-options) or [timezone](https://angular.io/api/common/DatePipe#parameters): | ||
|
|
||
| - **format** - The default value for formatting the date is 'mediumDate'. Other available options are 'short', 'long', 'shortDate', 'fullDate', 'longTime', 'fulLTime' and etc. This is a full list of all available [pre-defined format options](https://angular.io/api/common/DatePipe#pre-defined-format-options). | ||
| - **format** - The default value for formatting the date is 'mediumDate'. Other available options are 'short', 'long', 'shortDate', 'fullDate', 'longTime', 'fulLTime' and etc. This is a full list of all available [pre-defined Angular format options](https://angular.io/api/common/DatePipe#pre-defined-format-options) (legacy). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@dkamburov I've opened a new pull request, #6364, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * fix: correct capitalization of 'fullTime' in column-types.md Co-authored-by: dkamburov <1182001+dkamburov@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dkamburov <1182001+dkamburov@users.noreply.github.com>
Requires IgniteUI/igniteui-angular-samples#3752
Checklist:
preview\beta../relative/path.mdIgxSelectComponent,<igx-combo>code blocksfor the names of classes / tags / propertiescode blockspending-localizationlabel when the review of the PR is done