Skip to content

How to retrieve a list of supported locales in Next.js 13? #263

Closed Answered by amannn
albertothedev asked this question in Q&A
Discussion options

You must be logged in to vote

The Next.js 13 example is simplistic by intention. You can of course move your configuration to a separate module that you reference in all relevant places.

E.g.:

// src/config.ts
export default {
  locales: ['en', 'de'],
  defaultLocale: 'en'
};

Hope this helps!

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@amannn
Comment options

@albertothedev
Comment options

@amannn
Comment options

@albertothedev
Comment options

@amannn
Comment options

Answer selected by albertothedev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants