From 50f4af8028003ae67d262fbcf501ec1644c3b2a8 Mon Sep 17 00:00:00 2001 From: Aleksander Date: Sat, 22 May 2021 19:35:57 +0300 Subject: [PATCH] Add missing i18n types in gip context (#25363) ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [] Make sure the linting passes Ref: #21930 --- packages/next/next-server/lib/utils.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/next/next-server/lib/utils.ts b/packages/next/next-server/lib/utils.ts index 6af8e33dbdb7f..36adb6359eb33 100644 --- a/packages/next/next-server/lib/utils.ts +++ b/packages/next/next-server/lib/utils.ts @@ -135,6 +135,18 @@ export interface NextPageContext { * `String` of the actual path including query. */ asPath?: string + /** + * The currently active locale + */ + locale?: string + /** + * All configured locales + */ + locales?: string[] + /** + * The configured default locale + */ + defaultLocale?: string /** * `Component` the tree of the App to use if needing to render separately */