function locale_system_file_system_settings_submit
Same name and namespace in other branches
- 10 core/modules/locale/locale.module \locale_system_file_system_settings_submit()
- 11.x core/modules/locale/locale.module \locale_system_file_system_settings_submit()
- 9 core/modules/locale/locale.module \locale_system_file_system_settings_submit()
- 8.9.x core/modules/locale/locale.module \locale_system_file_system_settings_submit()
Submit handler for the file system settings form.
Clears the translation status when the Interface translations directory changes. Without a translations directory local po files in the directory should be ignored. The old translation status is no longer valid.
Deprecated
in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement.
See also
https://www.drupal.org/node/3571594
File
-
core/
modules/ locale/ locale.module, line 430
Code
function locale_system_file_system_settings_submit(&$form, FormStateInterface $form_state) : void {
@trigger_error(__FUNCTION__ . 'is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3571594', E_USER_DEPRECATED);
if ($form['translation_path']['#default_value'] != $form_state->getValue('translation_path')) {
locale_translation_clear_status();
}
\Drupal::configFactory()->getEditable('locale.settings')
->set('translation.path', $form_state->getValue('translation_path'))
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.