From a2f607497b62285516ca76368fdf224af5ff40e5 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Wed, 20 Dec 2023 16:48:08 +1000 Subject: [PATCH] DOC-1020: add `language_load` option to `ui-localization.adoc` page. (#3027) * DOC-1020: add option to page that configures whether additional plugin/theme languages are loaded when bundling. * DOC-1020: updates to language_load options and admons. * DOC-1020: copy edits and improvements. * Update modules/ROOT/partials/configuration/language_load.adoc Co-authored-by: Mitchell Crompton * Update changelog.md * Update modules/ROOT/partials/configuration/language_load.adoc Co-authored-by: Mitchell Crompton * Update modules/ROOT/partials/configuration/language_load.adoc Co-authored-by: Mitchell Crompton --------- Co-authored-by: Mitchell Crompton --- changelog.md | 4 +++ modules/ROOT/pages/ui-localization.adoc | 5 +--- .../partials/configuration/language_load.adoc | 29 +++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 modules/ROOT/partials/configuration/language_load.adoc diff --git a/changelog.md b/changelog.md index 9b2e10d957..c8899b09f2 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,10 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/ ### Unreleased +### 2023-12-20 + +- DOC-1020: add `language_load` option to `ui-localization.adoc` page that configures whether additional plugin/theme languages are loaded when bundling. + ### 2023-12-19 - DOC-2220: add generation of `latest` and `6` documentation in parallel. diff --git a/modules/ROOT/pages/ui-localization.adoc b/modules/ROOT/pages/ui-localization.adoc index 52610e9c6c..1dbab9d063 100644 --- a/modules/ROOT/pages/ui-localization.adoc +++ b/modules/ROOT/pages/ui-localization.adoc @@ -8,7 +8,4 @@ include::partial$configuration/language.adoc[] include::partial$configuration/language_url.adoc[] -//// -undocumented -include::partial$configuration/language_load.adoc[] -//// +include::partial$configuration/language_load.adoc[] \ No newline at end of file diff --git a/modules/ROOT/partials/configuration/language_load.adoc b/modules/ROOT/partials/configuration/language_load.adoc new file mode 100644 index 0000000000..1f14e99e89 --- /dev/null +++ b/modules/ROOT/partials/configuration/language_load.adoc @@ -0,0 +1,29 @@ +[[language_load]] +== `+language_load+` + +This option determines whether additional plugin or theme languages are loaded during {productname} editor initialization. By default, plugins which have support for languages other than English will automatically load the additional language packs. + +*Type:* `+boolean+` + +*Default value:* `+true+` + +* When the `+language_load+` option is set to `+true+`, any available language packs can be loaded and used by {productname} and plugins that support multiple-languages. +* When set to `+false+`, only explicitly configured language packs will load. + +[IMPORTANT] +Setting `+language_load+` option to `+false+` is not recommended unless loading local language packs. + +=== Example: using `+language_load+` + +[source,js] +---- +tinymce.init({ + selector: 'textarea', // Change this value according to your HTML + language_load: true, // Disables the automatic loading of additional plugin and theme language files. +}); +---- + +[TIP] +When bundling, it is advisable for plugins that support multiple languages to load the additional language packs locally, and to set this option to `+false+`. This will ensure that all required languages are available for the editor, and that no additional language packs will be retrieved by the plugins. + +You can find and download languages link:{gettiny}/language-packages/[here]. \ No newline at end of file