Tiger_Model_Translation
@api· extendsTiger_Model_Table
Translation — live translation overrides (the DB tier of i18n; see migration 0013).
File translations (core/app/module languages/config table for config. Read by Tiger_Application_Bootstrap::_initTranslate
and layered on top of the files (last wins). Scopes: global (platform-wide) and
org (per-tenant, reserved for later). Keys are owner-prefixed semantic keys
(core., app.,
Methods
getForLocale()
getForLocale($locale, $scope = self::SCOPE_GLOBAL, $scopeId = '')
Overrides for a locale + scope as a key => value map, ready to hand to Zend_Translate::addTranslation.
$localestring— language-only locale (en, es)$scopestring— SCOPE_GLOBAL | SCOPE_ORG$scopeIdstring— scope discriminator (org id for SCOPE_ORG, '' otherwise)
Returns array<string,string>
get()
get($locale, $scope, $scopeId, $key)
A single override value, or null.
$localestring— language-only locale (en, es)$scopestring— SCOPE_GLOBAL | SCOPE_ORG$scopeIdstring— scope discriminator (org id for SCOPE_ORG, '' otherwise)$keystring— owner-prefixed semantic translation key
Returns string|null — the override value, or null if none
set()
set($locale, $scope, $scopeId, $key, $value)
Upsert one override. Returns the translation_id.
$localestring— language-only locale (en, es)$scopestring— SCOPE_GLOBAL | SCOPE_ORG$scopeIdstring— scope discriminator (org id for SCOPE_ORG, '' otherwise)$keystring— owner-prefixed semantic translation key$valuestring— the override text
Returns string — the translation_id (existing on update, generated on insert)