protected function LanguageSwitchingTest::saveNativeLanguageName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Tests/LanguageSwitchingTest.php \Drupal\language\Tests\LanguageSwitchingTest::saveNativeLanguageName()
Saves the native name of a language entity in configuration as a label.
Parameters
string $langcode: The language code of the language.
string $label: The native name of the language.
1 call to LanguageSwitchingTest::saveNativeLanguageName()
- LanguageSwitchingTest::testLanguageBlock in core/
modules/ language/ src/ Tests/ LanguageSwitchingTest.php - Functional tests for the language switcher block.
File
- core/
modules/ language/ src/ Tests/ LanguageSwitchingTest.php, line 456 - Contains \Drupal\language\Tests\LanguageSwitchingTest.
Class
- LanguageSwitchingTest
- Functional tests for the language switching feature.
Namespace
Drupal\language\TestsCode
protected function saveNativeLanguageName($langcode, $label) {
\Drupal::service('language.config_factory_override')
->getOverride($langcode, 'language.entity.' . $langcode)
->set('label', $label)
->save();
}