Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Translation Strings in Code

TBATo obtain a correctly translated string for display to a user, based on their settings, use the OX_Translation class.

Code Block
require_once RV_PATH . '/lib/OX/Translation.php';
$oTranslation = new OX_Translation();
$text = $oTranslation->translate('TargetString');
Note

The translation key above excludes the "str" prefix used in the translation files. That is, the above code would be for the following entry in the translation files:

Code Block
$GLOBALS['strTargetString'] = "Target String";


Numeric, Date, Time and Currency Formats in Code

...