|The command does not update existing translations if the source translation file has been updated. It only creates translation files when none are present for a given language.|
The command takes two parameters; these are:
app: the name of the application.
lang: the output language of the translation files; more than one can be supplied.
To create the two translation files, the command reads translation data from a source PHP translation file.
In this example, we’ll create Austrian German translations for the Comments app.
This example assumes that the ownCloud directory is
First, create a source translation file in
In it, add the required translation strings, as in the following example.
Refer to the developer documentation on creating translation files, if you’re not familiar with creating them.
<?php // The source string is the key, the translated string is the value. $TRANSLATIONS = [ "Share" => "Freigeben" ]; $PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
After that, run the following command to create the translation.
sudo -u www-data php occ l10n:createjs comments de_AT
This will generate two translation files,