-
Notifications
You must be signed in to change notification settings - Fork 0
Translation
Bartosz Sułkowski edited this page Nov 29, 2024
·
1 revision
Tip
We're covering you how to change translation in /setup process!
Note
To handle all texts, library next-intl was used
All texts used in this project (without /setup page) are saved in a translation file to personalise the app easily.
In default, you can find the translation file in messages/pl.json
- Go to
i18n/request.tsand changelocalevariable
import { getRequestConfig } from 'next-intl/server'
export default getRequestConfig(async () => {
- const locale = 'pl'
+ const locale = 'en'
return {
locale,
messages: (await import (`@/messages/${locale}.json`)).default
}
})- Change the file name from
messages/pl.jsonto your language code
Warning
Project supports only one language (it means, there's no translation option for the user aka. no i18n routing).
Check if you have language file in the correct path. If file doesn't exist, project probably won't build.