dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
864 stars 467 forks source link

Make strings in custom blocks translatable #25839

Open john-thomas-dotcms opened 1 year ago

john-thomas-dotcms commented 1 year ago

We need all strings in the custom blocks to be translatable into other languages.

We'll do this using dotCMS Language variables, which allow users to create different versions of the strings for different languages. We'll create the Language variables in the default language, using the English versions of the strings; if customers want translations in languages other than English, they can easily create them.

Making the strings translatable requires changes to both the plugin and the custom blocks.

Plugin

Implement new code to create Language variables for each of the strings, with a unique key for each string.

UI

Change all string retrieval to pull the strings based on the key, using the methods already identified.

github-actions[bot] commented 12 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

john-thomas-dotcms commented 9 months ago

The strings in the block editor blocks are all translatable now.

There are 2 things left to do on this:

  1. Update all the strings in the AI portlet to use language props.
  2. Ensure all error messages produced to the front-end user are using language props.