On This Page:
Before you Start.
Historical Terms
Revive Adserver, as a project, has been around for a very long time, and as a result, some of the language that you will find used the code base will often not align with the language used in the UI, as the terms used in online advertising have changed over the decades.
The following is list of historical terms that may be helpful to be aware of when reading code/comments in code.
Current UI Terminology | Previous Terminology In Code |
---|---|
Delivery Options | ACLs |
Delivery Rules | Delivery Limitations Limitations |
Delivery Rule Sets | Targeting Channels Channels |
Managing Localization
The translation of localization strings for the user interface are managed through the Revive Adserver Crowdin project.
This means that if you think a translation used in the user interface for any language other than English is incorrect, please create an account with Crowdin, and suggest a new translation there. Accepted translations are periodically merged by the core Revive Adserver team into the master branch of Revive Adserver, and will be included in the next release.
However, if you think that:
- A master English translation needs to be changed (e.g. to reflect changed functionality);
- A new master English translation key needs to be added (e.g. to reflect new functionality); or
- A master English translation key needs to be removed (e.g. to reflect removed functionality)
then these changes should all be performed as a change in the master branch.
The changes to the master English files are automatically imported into the Crowdin project. Translations in languages other English will be automatically updated to reflect the added or out of date translations that need to be corrected, and to remove any keys no longer required.
Translation Strings in PHP Code
In PHP code, to obtain a correctly translated string for display to a user, based on their settings, use the OX_Translation
class:
require_once RV_PATH . '/lib/OX/Translation.php'; $oTranslation = new OX_Translation(); $text = $oTranslation->translate('TargetString');
The translation key used excludes the "str" prefix used in the translation files. That is, the above code would be for the following entry in the translation files:
$GLOBALS['strTargetString'] = "Target String";
Translation Strings in Smarty Templates
In Smarty template code, to obtain a correctly translated string for display to a user, based on their settings, use the t
function:
{t str=TargetString}
The translation key used excludes the "str" prefix used in the translation files. That is, the above code would be for the following entry in the translation files:
$GLOBALS['strTargetString'] = "Target String";
Numeric, Date, Time and Currency Formats in Code
TBA