VuFind has comprehensive internationalization (i18n) support built in. Every user-visible string in the interface is defined in aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vufind-org/vufind/llms.txt
Use this file to discover all available pages before exploring further.
.ini language file, the active language is set in config.ini, and your institution can override individual strings or add entirely new languages without modifying any core files.
Available languages
VuFind ships with language files for the following locales in thelanguages/ directory:
European languages
ca Catalan · cs Czech · cy Welsh · da Danish · de German · el Greek · en English · en-gb English (UK) · es Spanish · eu Basque · fi Finnish · fr French · ga Irish · gl Galician · hr Croatian · it Italian · nl Dutch · nl-be Dutch (Belgium) · pl Polish · pt Portuguese · pt-br Portuguese (Brazil) · ru Russian · se Northern Sami · sl Slovenian · sv Swedish · tr Turkish · uk UkrainianAsian and other languages
ar Arabic · bn Bengali · he Hebrew · hi Hindi · hy Armenian · ja Japanese · mi Māori · mn Mongolian · ta Tamil · vi Vietnamese · zh Chinese (Traditional) · zh-cn Chinese (Simplified)ar, he) are supported natively; see the RTL section below.
In addition to the top-level language files, VuFind organizes specialized string sets into subdirectories: CallNumberFirst/, CookieConsent/, CreatorRoles/, DDC23/, Exception/, HoldingStatus/, ILSMessages/, ISO639-3/, IndexFieldDescription/, Payment/, RecordAttribute/, Reserves/, ServiceType/, and WorldCatFormats/.
Setting the default language
Openlocal/config/vufind/config.ini and locate the [Site] section:
local/config/vufind/config.ini
browserDetectLanguage = true causes VuFind to honor the user’s browser language preference. When the browser reports a language code that matches an available .ini file, that language is used automatically without any user action.Language file format
Language files are standard INI files withkey = "value" pairs, one per line. Keys can contain spaces. Values must be quoted when they contain special characters or are empty.
languages/en.ini
- Keys are case-sensitive.
- Values may contain HTML (
<em>,<strong>, etc.) when the template uses thetranslateortransEscview helper appropriately. - Placeholders like
%%title%%and%%details%%are replaced at render time with dynamic values. - The
aliases.inifile maps one key to another, providing a simple aliasing mechanism for strings that should display identically (e.g.,bulk_email_cart = "bulk_email").
Overriding existing translations
To change how a string appears in your installation, add only the key you want to change to a file inlocal/languages/. VuFind merges your local file on top of the core language file, so you need only the lines that differ.
Creating custom language strings
If you add new content to templates — for example, a custom help page or an institutional message — define new translation keys in your local language files rather than hard-coding text into the template.local/languages/en.ini
translate (or transEsc) view helper:
template.phtml
local/languages/fr.ini
Right-to-left language support
VuFind has first-class support for right-to-left scripts. When the active language is a RTL language such as Arabic (ar) or Hebrew (he), VuFind automatically:
- Adds the
dir="rtl"attribute to the<html>element. - Loads RTL-aware Bootstrap 5 CSS (Bootstrap 5 supports logical properties natively).
- Swaps directional icons (e.g.,
more↔more-rtl,page-next↔page-next-rtl). - Mirrors sidebar position if
mirrorSidebarInRTL = trueinconfig.ini. - Mirrors thumbnail position if
mirrorThumbnailsRTL = trueinconfig.ini.
[Site] section of config.ini:
local/config/vufind/config.ini
Adding a new language
Create the language file
Add a new
.ini file to local/languages/ named with the BCP 47 language code. For a hypothetical Klingon (tlh) translation:Declare a fallback language
For languages where only a partial translation exists, point VuFind to a fallback language in
config.ini. Strings not found in tlh.ini will be sourced from en.ini:local/config/vufind/config.ini
Add the language to the switcher
To make the language selectable in the interface, add it to the
[Languages] section of config.ini:local/config/vufind/config.ini
Add a native-script label
The
languages/native.ini file maps language codes to their native-script names for use in the language switcher. Add your new language:local/languages/native.ini
Subdirectory language files
Specialized string sets are organized into subdirectories oflanguages/. To override strings in one of these sets, mirror the subdirectory path under local/languages/:
local/languages/HoldingStatus/en.ini
| Subdirectory | Contains |
|---|---|
CallNumberFirst/ | Call-number-first display labels |
CookieConsent/ | Cookie consent dialog strings |
CreatorRoles/ | MARC relator / creator role labels |
DDC23/ | Dewey Decimal Classification labels |
Exception/ | Error and exception messages |
HoldingStatus/ | Item availability status labels |
ILSMessages/ | Messages returned from the ILS driver |
IndexFieldDescription/ | Solr field description labels |
ISO639-3/ | Language names from the ISO 639-3 standard |
Payment/ | Fine payment workflow strings |
RecordAttribute/ | Record attribute display labels |
Reserves/ | Course reserves strings |
ServiceType/ | ILS service type labels |
WorldCatFormats/ | WorldCat format type labels |
Language aliases
Thelanguages/aliases.ini file at the root of the languages/ directory maps one translation key to another. This is useful when two different contexts should display the same string:
languages/aliases.ini
local/languages/aliases.ini using the same format.
Debugging missing translations
Debugging missing translations
If a string appears in the interface as its raw key (e.g.,
my_custom_heading rather than the translated value), check:- The key is spelled exactly as it appears in the template call.
- The language file has been saved and the cache cleared.
- The key is in the correct language file for the active language.
- There are no syntax errors in the INI file (unclosed quotes, invalid characters).
Translation fallback chain
Translation fallback chain
When a string is missing from the active language, VuFind searches:
- Active language file (e.g.,
fr.ini) - Languages listed in
fallback_languages - The default language (
language = en) - English (
en.ini) as the final fallback
Exposing translations to JavaScript
Exposing translations to JavaScript
VuFind can pass translation strings into the browser’s JavaScript context using the The strings are then available in JavaScript as
jsTranslations view helper. Add keys to the helper call in your layout template:layout.phtml
VuFind.translate('my_js_message').