You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elaborate how one is supposed to change the admin panel's language
because it is not initially clear or trivial to someone new and going
through the docs from the start.
---------
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
Users can change their preferred language in their account settings or by otherwise manipulating their [User Preferences](../admin/preferences).
178
+
179
+
## Node.js#node
176
180
177
181
Payload's backend sets the language on incoming requests before they are handled. This allows backend validation to return error messages in the user's own language or system generated emails to be sent using the correct translation. You can make HTTP requests with the `accept-language` header and Payload will use that language.
178
182
179
183
Anywhere in your Payload app that you have access to the `req` object, you can access Payload's extensive internationalization features assigned to `req.i18n`. To access text translations you can use `req.t('namespace:key')`.
180
184
181
185
## TypeScript
182
186
183
-
In order to use custom translations in your project, you need to provide the types for the translations.
187
+
In order to use [Custom Translations](#custom-translations) in your project, you need to provide the types for the translations.
184
188
185
189
Here we create a shareable translations object. We will import this in both our custom components and in our Payload config.
0 commit comments