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.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
development:architecture:localization [2015/12/21 16:47] – ↷ Links adapted because of a move operation demiankatz | development:architecture:localization [2016/05/31 19:07] – [Text Domains] demiankatz | ||
---|---|---|---|
Line 22: | Line 22: | ||
* Save the file in UTF-8 format without a Byte Order Marker (BOM). | * Save the file in UTF-8 format without a Byte Order Marker (BOM). | ||
- | * Sort the file after adding new lines. | + | * Make sure the file is sorted in a case-insensitive manner; VuFind' |
* 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 29: | Line 29: | ||
Note: If modifications to a language file do not take effect, sometimes it is necessary to clear out the local directory language cache by removing the local/ | Note: If modifications to a language file do not take effect, sometimes it is necessary to clear out the local directory language cache by removing the local/ | ||
+ | === Sorting Language Files === | ||
+ | |||
+ | To sort a directory full of language files, simply go to the command line, and from your $VUFIND_HOME directory, run: | ||
+ | |||
+ | php public/ | ||
+ | | ||
+ | VuFind will automatically sort the files for you. | ||
==== Adding a New Language ==== | ==== Adding a New Language ==== | ||
- Create a new language file as described [[# | - Create a new language file as described [[# | ||
+ | - 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: | - Edit [[configuration: | ||
Line 110: | 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:// | ||
+ | * 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