You are here

function globallink_add_locale_mapping in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_locale_mapping.inc \globallink_add_locale_mapping()
  2. 7.6 globallink_locale_mapping.inc \globallink_add_locale_mapping()

Adds locale mapping for Drupal locales.

Parameters

string $drupal_locale: The Drupal locale.

string $drupal_locale_desc: The Drupal locale description.

string $locale_code: The locale code.

1 call to globallink_add_locale_mapping()
globallink_locale_submit in ./globallink_locale_mapping.inc
Handles submission of globallink_locale form.

File

./globallink_locale_mapping.inc, line 223
Globallink_locale_mapping.inc is a file that contains most functions needed on the Locale Mapping UI.

Code

function globallink_add_locale_mapping($drupal_locale, $drupal_locale_desc, $locale_code) {
  db_update('globallink_locale')
    ->fields(array(
    'drupal_locale_code' => $drupal_locale,
    'drupal_locale_desc' => $drupal_locale_desc,
  ))
    ->condition('locale_code', $locale_code, '=')
    ->execute();
}