Early AdoptersUser loginLicense![]() The contents of this website, unless otherwise stated, are licensed under a Creative Commons License. |
Translating HyperJournal
HyperJournal uses a smarty configuration file to handle translations.
A config file is loaded at the beginning of each template:
{config_load file="$lang.cfg"}
The HyperJournal's smarty templates contains some identifiers that are substituted with a localization string before the output is sent to the browser. There is a localization file for each language which contains the translations of all the identifiers of hyperjournal. The name of the localization file is the ISO 3166-1 alpha-2 country code (lowercase) followed by .cfg (e.g. en.cfg for english, it.cfg for italian) and the file is placed in the i18n directory. Creating a localization file and adding a new languageTo localize HyperJournal you need to create a cfg file and place it in the i18n/ directory, hyperjournal will then load your localization file and the new language can be selected in control panel-->journal. It's suggested to use an existing localization file and modify the identifier's values to match your language.Anatomy of a localization stringDo not forget that you cannot place carriage returns into localization strings (they must be one line long).HTML character entitiesAll accented and special characters must be escaped with HTML character entities. Some characters must be escaped to avoid conflict with XHTML markup: angle brackets (< and >), and ampersands (&). In addition, there are a few other characters that must be escaped, such as non-breaking spaces ( ), angle quotes (« and »), curly apostrophes (’) and curly quotes. For more information about the W3C's best practices involving character encodings and character entities, see the following references:
Caution: Be sure to save your localization file using an utf-8 encoding! An ExampleThe following is part of a localization file#A comment starts with a # #You can place comments in the file to make the extension of your file easier ################################################ #section: ExampleSection #you can write a brief description here #to help translator understand where the #identifiers contained in this section are used. ################################################ applyFilter = "Filtra lista" checkLogs = "Controlla i log" backup = "Backup" editUsers = "Modifica gli utenti" submitted = "Inviato" editProfile = "Modifica il profilo" executedStore = "Salvataggio eseguito" outOfSession = "Sessione scaduta" evaluateContributions = "Valuta" clear = "clear" wrongOrderingParameters = "Parametri di ordinamento non validi" evalPageInvalidAccess = "Accesso non consentito" viewContributions = "Mostra i contributi" viewContribution = "leggi l'articolo" edit = "edit" #endOfSection ( categories: Documentation )
|
DonationsTo make a donation just click the button below. You can donate via paypal and credit card. Thank you!!!
AdsNavigation |