public LocaleConfigManager::getActiveConfigLangcode($name)
Returns the current language code for this active configuration.
Parameters
string $name: The configuration name.
Return value
null|string Language code of the current active configuration for $name. If the configuration data for $name did not contain a language code, it is assumed to be English. The return value is NULL if no such active configuration exists.
File
- core/modules/locale/src/LocaleConfigManager.php, line 516
Class
- LocaleConfigManager
- Manages configuration supported in part by interface translation.
Namespace
Drupal\locale
Code
public function getActiveConfigLangcode($name) { $active = $this->configStorage->read($name); if (!empty($active)) { return !empty($active['langcode']) ? $active['langcode'] : 'en'; } }
Please login to continue.