docs: internationalization (i18n) - #238
Conversation
Add a cross-cutting-concerns page covering end-to-end localization: backend IStringLocalizer with neutral-culture resx and RequestLocalization, the five-step culture-resolution chain, per-user User.Locale on the JWT locale claim, and both React apps on react-i18next with a language switcher. Includes an "adding a language" guide and a changelog entry.
|
Reviewed - thorough page, and the culture-resolution chain + neutral-resx-name gotchas are exactly the right level of detail. Holding until upstream #1344 merges (still open). When it does: rebase over main's em-dash -> hyphen conversion, re-date the changelog section to the actual merge date, and double-check the final shipped config keys ( |
Localized problem details mean `detail` is prose in the caller's language, so clients must branch on the exception's MessageKey, now emitted as a `code` extension. Documents the field in Error handling, cross-links it from Internationalization, and extends the i18n changelog entry. Also corrects the CustomException row: `title` is the localized status title, not the exception type name (the type name is only the fallback).
# Conflicts: # src/content/docs/cross-cutting-concerns/index.mdx
|
Rebased onto The conflict was One consequence of that sweep worth naming, because it is silent. Converting Pre-existing on On scope: this PR stays whole and covers all four slices of the code split (fullstackhero/dotnet-starter-kit#1360, #1361, #1362, #1363) - |
Documents the internationalization (i18n) feature and adds the changelog entry.
The code PR this originally tracked, fullstackhero/dotnet-starter-kit#1344, was split into four on review request. This documentation covers all four, so it stays a single PR:
internationalization.mdxis one page whose sections map across the split, and cutting it into four would put four PRs on the same file and leave three of them describing half a feature.ConfigurationcodeonProblemDetailsinerror-handling.mdx{Module}Resourcescatalogs, localized messagesAccept-Language, switcher, locale-aware formattingPlease merge this after the last of the four, not with the first. Landing it alongside the framework slice alone would publish the module-catalog and front-end sections before that code is on
main, and a reader following those instructions would find nothing there. Docs lagging the code by a few merges is the safer direction (Golden Rule #10 is satisfied by the docs travelling with the change, and all four are in flight together).SharedResourcesplus per-module{Module}Resources), localizedProblemDetailsand FluentValidation messages, theUser.Localefield and fallback, and the front-endreact-i18nextsetup with enforceden-US/pt-BRkey parity.codeextension onProblemDetailsin the error-handling page, and corrects pre-existing drift in that table: it saidtitlewas the exception type name, which post-i18n is the localized title by status, with the type name only as fallback.