You are here

public function i18n_translation_set::add_translations in Internationalization 7

Add array of translation items

Parameters

$translations array: Translation items indexed by language code

2 calls to i18n_translation_set::add_translations()
i18n_translation_set::get_objects in i18n_translation/i18n_translation.inc
Get translations as i18n objects, indexed by language
i18n_translation_set::reset_translations in i18n_translation/i18n_translation.inc
Reset translations, set empty array or new array of translations.

File

i18n_translation/i18n_translation.inc, line 383
Internationalization (i18n) module - Translation set

Class

i18n_translation_set
@file Internationalization (i18n) module - Translation set

Code

public function add_translations($translations) {
  foreach ($translations as $langcode => $item) {
    $this
      ->add_item($item, $langcode);
  }
  return $this;
}