About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:architecture:localization:lokalise

This is an old revision of the document!


Lokalise

The VuFind® project uses Lokalise to manage its internationalization. This page provides some notes on how to utilize the platform effectively.

Notes for Translators

Volunteer translators can be granted access to one or more languages used by the project. It is then possible to edit and add translations through a web-based interface. If you would like to volunteer as a translator, please contact info@vufind.org and let us know which language(s) you can help with.

Providing Translations

Details coming soon…

Notes for Administrators

Lokalise users with administrative access have the power to update Lokalise with the latest translations in the project's GitHub repository, and to export the latest Lokalise translations into the project.

Importing Translations from VuFind®

To manually load translations from VuFind®'s GitHub repository into Lokalise, follow these steps:

  1. Log in to Lokalise and go to the GitHub app page within the site.
  2. Double-check that the following pull options are set to ON (and all other options are OFF):
    • Replace \n with line break
    • Differentiate keys by file
    • Cleanup mode
  3. Click “Pull now”

Note that it may take a few minutes for processing to complete.

Exporting Translations to VuFind®

To export the latest Lokalise translations into VuFind®, follow these steps:

  1. Log in to Lokalise, and go to the “download” page.
  2. Make sure the following download options are set:
    • File format: PHP INI (.ini)
    • Languages: All
    • File structure: Multiple files per language
    • Content to export: Data: All
    • Advanced settings: Don't use directory prefix
    • Empty translations: Don't export
    • App triggers: Ensure that GitHub is unchecked to prevent unwanted PR creation
    • …other settings should not matter.
  3. Click “Build and download”
  4. On a machine with the latest VuFind® dev branch checked out, unzip the downloaded .zip file somewhere (e.g. /tmp)
  5. Run php $VUFIND_HOME/public/index.php language/importlokalise /tmp/language $VUFIND_HOME/language to load the updated translations (replace /tmp/language with the location of your unzipped files, if you chose somewhere other than /tmp).
  6. Use git diff to inspect the loaded translations and make sure they are complete, appropriate and correct.
  7. If all is well, commit the changes!
development/architecture/localization/lokalise.1695377059.txt.gz · Last modified: 2023/09/22 10:04 by demiankatz