Locale.php

Same filename and directory in other branches
  1. 8.9.x core/modules/locale/src/Locale.php
  2. 10 core/modules/locale/src/Locale.php
  3. 11.x core/modules/locale/src/Locale.php

Namespace

Drupal\locale

File

core/modules/locale/src/Locale.php

View source
<?php

namespace Drupal\locale;


/**
 * Static service container wrapper for locale.
 */
class Locale {
    
    /**
     * Returns the locale configuration manager service.
     *
     * Use the locale config manager service for creating locale-wrapped typed
     * configuration objects.
     *
     * @see \Drupal\Core\TypedData\TypedDataManager::create()
     *
     * @return \Drupal\locale\LocaleConfigManager
     */
    public static function config() {
        return \Drupal::service('locale.config_manager');
    }

}

Classes

Title Deprecated Summary
Locale Static service container wrapper for locale.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.