function locale_install

Same name in other branches
  1. 9 core/modules/locale/locale.install \locale_install()
  2. 8.9.x core/modules/locale/locale.install \locale_install()
  3. 10 core/modules/locale/locale.install \locale_install()
  4. 11.x core/modules/locale/locale.install \locale_install()

Implements hook_install().

File

modules/locale/locale.install, line 11

Code

function locale_install() {
    // locales_source.source and locales_target.target are not used as binary
    // fields; non-MySQL database servers need to ensure the field type is text
    // and that LIKE produces a case-sensitive comparison.
    db_insert('languages')->fields(array(
        'language' => 'en',
        'name' => 'English',
        'native' => 'English',
        'direction' => 0,
        'enabled' => 1,
        'weight' => 0,
        'javascript' => '',
    ))
        ->execute();
}

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