feat: add passing in translations

This commit is contained in:
Elliot DeNolf 2024-04-10 10:26:58 -04:00
parent 57dc23eb28
commit 4e29d53694
3 changed files with 14 additions and 0 deletions

View File

@ -22,6 +22,7 @@
"@payloadcms/next": "3.0.0-beta.0",
"@payloadcms/richtext-lexical": "3.0.0-beta.0",
"@payloadcms/richtext-slate": "3.0.0-beta.0",
"@payloadcms/translations": "3.0.0-beta.0",
"@payloadcms/ui": "3.0.0-beta.0",
"cross-env": "^7.0.3",
"next": "14.2.0-canary.23",

View File

@ -1,5 +1,6 @@
import path from 'path'
// import { postgresAdapter } from '@payloadcms/db-postgres'
import { en } from '@payloadcms/translations/languages/en'
import {
AlignFeature,
BlockQuoteFeature,
@ -70,6 +71,15 @@ export default buildConfig({
db: mongooseAdapter({
url: process.env.MONGODB_URI || '',
}),
/**
* Payload can now accept specific translations from the @payloadcms/translations package.
* This is an optional feature.
*/
i18n: {
supportedLanguages: { en },
},
admin: {
autoLogin: {
email: 'dev@payloadcms.com',

View File

@ -20,6 +20,9 @@ dependencies:
'@payloadcms/richtext-slate':
specifier: 3.0.0-beta.0
version: 3.0.0-beta.0(@payloadcms/translations@3.0.0-beta.0)(@payloadcms/ui@3.0.0-beta.0)(payload@3.0.0-beta.0)(react-dom@18.2.0)
'@payloadcms/translations':
specifier: 3.0.0-beta.0
version: 3.0.0-beta.0
'@payloadcms/ui':
specifier: 3.0.0-beta.0
version: 3.0.0-beta.0(@types/react@18.2.74)(monaco-editor@0.47.0)(next@14.2.0-canary.23)(payload@3.0.0-beta.0)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.23.0)