You are here

public static function i18nStringTestCase::stringSaveTranslation in Internationalization 7

Translate one string into the db

1 call to i18nStringTestCase::stringSaveTranslation()
i18nStringTestCase::stringCreateTranslation in i18n_string/i18n_string.test
Create and store one translation into the db

File

i18n_string/i18n_string.test, line 210
Test case for multilingual string

Class

i18nStringTestCase
Class for testing i18n_string and modules using these features

Code

public static function stringSaveTranslation($name, $lang, $translation) {
  list($textgroup, $context) = i18n_string_context($name);
  return i18n_string_textgroup($textgroup)
    ->update_translation($context, $lang, $translation);
}