Hi Karnova,
first I must warn you: I'm not an OJS developer, but a user just like you. So take my words with a grain of salt - I could be wrong or overlooking something.
First, the functions that are defined for $article are in three places. $article is an instance of the class PublishedArticle, which you will find in /classes/article/PublishedArticle.inc.php. Every PublishedArticle is also an Article, so it inherits all the functions from /classes/article/Article.inc.php. And every Article also is a Submission, so the functions of the class Submission are also applicable to $article. The code for the Submission class is in /lib/pkp/classes/submission/Submission.inc.php.
Secondly: Unfortunately there's not one list of all translate keys. They're spread over many files in many different locations. The most import are all the XML files in the subfolders of /locale and /lib/pkp/locale. Every plugin has its own locale files, so there are translate key definitions in the plugin folders, too.
You can simply add a new locale key by following the pattern that you'll see in those files, for example in /locale/en_US/locale.xml:
- Code: Select all
<message key="navigation.categories">Categories</message>
The value after "key" is the one you can call through your template's {translate key=XXX} function. It will return the text in the message element, e.g. "Categories" and use that to display on your website. So, if you add a new line like this:
- Code: Select all
<message key="article.submissionDate">Submission Date</message>
in the en_US folder or
- Code: Select all
<message key="article.submissionDate">Datum podání</message>
in the cs_CZ folder, etc., the program will choose the appropriate words for displaying, according to the locale chosen by you and/or the user of your website, when {translate key="article.submissionDate"} will be called in the template.
Also note that there is a tool for working with the locale keys available for journal managers. In the journal management, go to Plugins, then click on "Generic Plugins" and then choose / activate the "Translation plugin" in this list. This will allow you to edit the existing localization key/value-pairs.