Socket
Socket
Sign inDemoInstall

@payloadcms/translations

Package Overview
Dependencies
0
Maintainers
6
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @payloadcms/translations

These are the translations for Payload. Translations are used on both the server and the client. The admin panel uses translations to display text to the user in their selected language. The server uses translations when sending API responses.


Version published
Weekly downloads
5.2K
increased by31.18%
Maintainers
6
Install size
0.967 MB
Created
Weekly downloads
 

Readme

Source

Payload Translations

These are the translations for Payload. Translations are used on both the server and the client. The admin panel uses translations to display text to the user in their selected language. The server uses translations when sending API responses.

How to contribute

Updating a translation
  1. Open the language file you wish to edit located within the src/all folder
  2. Update the translation value
  3. Run one of the following:
    yarn build
    // or
    npm build
    // or
    pnpm build
    
Adding a new translation
  1. Add the new translation key/value pair for all languages located in the src/all folder
  2. Open the src/build.ts file and add the key to either clientTranslationKeys or serverTranslationKeys depending on where the translation will be used.
  3. Run one of the following:
    yarn build
    // or
    npm build
    // or
    pnpm build
    
Adding a new language
  1. Create a new JSON file in the src/all folder with the language code as the file name (e.g. en.json for English)
  2. Translate all of the keys in the new file
  3. Open the src/index.ts file and import your json file and then export it inside the translations object
  4. Run one of the following:
    yarn build
    // or
    npm build
    // or
    pnpm build
    

FAQs

Last updated on 01 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc