Skip to content

Commit

Permalink
fix: align with nextjs i18n config types (#2057)
Browse files Browse the repository at this point in the history
* fix: align with nextjs i18n config types

* docs: changelog

* feat: add domains too
  • Loading branch information
belgattitude committed Dec 12, 2022
1 parent c3bae4a commit b2ef1bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 13.0.1

### Fix

- Fix missing `i18n.localeDetection` in UserConfig, see [#2057](https://github.com/i18next/next-i18next/pull/2057).

## 13.0.0

The v13.0.0 release is a major version to improve stability and general experience.
Expand Down
15 changes: 13 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@ import {
} from 'i18next'
import { appWithTranslation, i18n } from './'

/**
* Inlined from `import('next').NextConfig.i18n` v13.0.6. As we support
* multiple nextjs versions it's safer to inline and keep it up-to-date.
*/
type NextJsI18NConfig = {
defaultLocale: string
locales: string[]
defaultLocale: string;
domains?: {
defaultLocale: string;
domain: string;
http?: true;
locales?: string[];
}[];
localeDetection?: false;
locales: string[];
}

export type UserConfig = {
Expand Down

0 comments on commit b2ef1bd

Please sign in to comment.