/** * @deprecated * * Clones language depended data from one language to other for $table * * @param string $table table name to clone values * @param string $to_lang 2 letters destination language code * @param string $from_lang 2 letters source language code * @return bool Always true */ function fn_clone_language_values($table, $to_lang, $from_lang = CART_LANGUAGE) { return LanguageHelper::cloneLanguageValues($table, $to_lang, $from_lang); }
/** * Gets block descriptions * @param array $blocks blocks list * @param string $lang_code language code * @return array blocks list with descriptions */ public static function getBlockDescriptions($blocks, $lang_code = CART_LANGUAGE) { $descriptions = array(); foreach ($blocks as $type => $block) { $descriptions[$type] = 'block_' . $type . '_description'; } LanguageHelper::preloadLangVars($descriptions, $lang_code); foreach ($blocks as $type => $block) { $description = __($descriptions[$type], array(), $lang_code); // language variable does not exist if ($description == '_' . $descriptions[$type]) { $description = ''; } $blocks[$type]['description'] = $description; } return $blocks; }