function LanguageManager::getUnitedNationsLanguageList

Same name in other branches
  1. 9 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getUnitedNationsLanguageList()
  2. 10 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getUnitedNationsLanguageList()
  3. 11.x core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getUnitedNationsLanguageList()

The 6 official languages used at the United Nations.

This list is based on http://www.un.org/en/sections/about-un/official-languages/index.html and it uses the same format as getStandardLanguageList().

Return value

array An array with language codes as keys, and English and native language names as values.

2 calls to LanguageManager::getUnitedNationsLanguageList()
Language::getConfig in core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.
LanguageTest::providerGetConfig in core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php
Provides a list of configs to test.

File

core/lib/Drupal/Core/Language/LanguageManager.php, line 342

Class

LanguageManager
Class responsible for providing language support on language-unaware sites.

Namespace

Drupal\Core\Language

Code

public static function getUnitedNationsLanguageList() {
    return [
        'ar' => [
            'Arabic',
            
            /* Left-to-right marker "‭" */
'العربية',
            LanguageInterface::DIRECTION_RTL,
        ],
        'zh-hans' => [
            'Chinese, Simplified',
            '简体中文',
        ],
        'en' => [
            'English',
            'English',
        ],
        'fr' => [
            'French',
            'Français',
        ],
        'ru' => [
            'Russian',
            'Русский',
        ],
        'es' => [
            'Spanish',
            'Español',
        ],
    ];
}

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