Translation
LiteQuote is fully translatable. All user-facing strings use WordPress i18n functions.
Included Languages
| Language | File | Status |
|---|---|---|
| English | Built-in (default) | Complete |
| French (fr_FR) | languages/litequote-fr_FR.po | Complete |
| Spanish (es_ES) | languages/litequote-es_ES.po | Complete |
| Arabic (ar) | languages/litequote-ar.po | Complete |
| German (de_DE) | languages/litequote-de_DE.po | Complete |
| Italian (it_IT) | languages/litequote-it_IT.po | Complete |
| Portuguese - Brazil (pt_BR) | languages/litequote-pt_BR.po | Complete |
How WordPress Translation Works
- LiteQuote's default language is English
- When WordPress is set to another language (e.g., French), it looks for a
.mofile inlanguages/ - If found, all
__()and_e()strings are automatically translated - If not found, English is displayed
Adding a New Translation
Using Poedit (desktop app)
- Download Poedit (free)
- Open
languages/litequote.pot - Create a new translation (e.g., Spanish)
- Translate all strings
- Save as
litequote-es_ES.po(Poedit auto-generates the.mofile) - Place both files in the
languages/folder
Using Loco Translate (WordPress plugin)
- Install and activate Loco Translate
- Go to Loco Translate > Plugins > LiteQuote
- Click New Language
- Select your language and translate in the browser
- Save -- the
.poand.mofiles are created automatically
Using WordPress.org (community)
If LiteQuote is published on WordPress.org, translations can be contributed via translate.wordpress.org.
Translation Functions Used
| Function | Usage |
|---|---|
__() | Returns translated string |
_e() | Echoes translated string |
esc_html__() | Returns escaped translated string |
esc_html_e() | Echoes escaped translated string |
esc_attr__() | Returns attribute-safe translated string |
_n() | Handles plural forms |
_n_noop() | Registers plural strings for later translation |
Text Domain
- Text domain:
litequote - Domain path:
/languages - Declared in the plugin header:
php
Text Domain: litequote
Domain Path: /languagesWPML / Polylang Compatibility
LiteQuote is compatible with WPML and Polylang. All strings are automatically detected by these plugins because we use standard WordPress i18n functions with the litequote text domain.
Translatable Settings
The button text and price label are stored as options (not translated via .po). The merchant types them in their language directly in the settings. This is by design -- these are customizable per store, not per language.
For multilingual stores using WPML, use WPML's String Translation to translate these options.