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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
development:architecture:localization [2016/03/29 18:03] – [Formatting Language Files] demiankatzdevelopment:architecture:localization [2018/12/19 14:19] – [Language Support] demiankatz
Line 1: Line 1:
 ====== Language Support ====== ====== Language Support ======
  
-// This page refers to VuFind 2.x and later; for earlier documentation, see [[legacy:vufind_1.x_developer_manual:language_localization_support|VuFind 1.x Language/Localization Support]]. //+// This page refers to VuFind 2.x and later; use of earlier versions is no longer recommended. //
  
 Keywords: localization, l10n, internationalization, i18n Keywords: localization, l10n, internationalization, i18n
Line 22: Line 22:
  
   * Save the file in UTF-8 format without a Byte Order Marker (BOM).  Including a BOM may cause VuFind to fail to parse the file correctly.   * Save the file in UTF-8 format without a Byte Order Marker (BOM).  Including a BOM may cause VuFind to fail to parse the file correctly.
-  * Make sure the file is sorted in a case-insensitive manner; VuFind's test suite will complain if language files are out of order. A command-line tool exists to perform this sorting for you (see below).+  * Make sure the file is sorted in a case-insensitive manner; VuFind's test suite will complain if language files are out of order, though it will not prevent translations from working properly in the user interface. A command-line tool exists to perform this sorting for you (see below).
   * Put double-quotes around multi-word phrases on the right side of the equals sign.  Do NOT put quotes around phrases on the left side of the equals sign.   * Put double-quotes around multi-word phrases on the right side of the equals sign.  Do NOT put quotes around phrases on the left side of the equals sign.
  
Line 39: Line 39:
  
   - Create a new language file as described [[#formatting language files|above]] and put it in the languages directory (either in the root of VuFind if you are planning to commit the new language to the master branch, or inside your [[configuration:local_settings_directory|local settings directory]] if this is a local customization).   - Create a new language file as described [[#formatting language files|above]] and put it in the languages directory (either in the root of VuFind if you are planning to commit the new language to the master branch, or inside your [[configuration:local_settings_directory|local settings directory]] if this is a local customization).
 +  - If you also wish to translate strings inside text domains (see below) you will need to create appropriate subdirectories inside languages, and put additional language files inside these directories.
   - If desired, translate help screens as described [[#help screen translation|above]].   - If desired, translate help screens as described [[#help screen translation|above]].
   - Edit [[configuration:files:config.ini]] and add your new language to the [Languages] section.   - Edit [[configuration:files:config.ini]] and add your new language to the [Languages] section.
Line 117: Line 118:
 on a valid $translator object would return "The translation". on a valid $translator object would return "The translation".
  
 +Text domains currently used by VuFind:
 +
 +  * CreatorRoles - used for translating author relator terms (such as [[https://www.loc.gov/marc/relators/relaterm.html|these]])
 +  * HoldingStatus - used for displaying complex item availability messages (not supported by all ILS drivers)
 ===== Help Screen Translation ===== ===== Help Screen Translation =====
  
development/architecture/localization.txt · Last modified: 2024/01/10 13:56 by demiankatz