Languages & Localization
How to translate and customize the text on JReviews 6 Early Access pages. You only need to define the text you want to change, and the rest falls back to the built-in strings. Features that have not yet been rewritten still use the older system covered in the JReviews 5 docs.
How Localization Works in JReviews 6
All the labels, headings, and buttons in JReviews come from language files that you can edit to translate the text or simply reword it to better fit your site. JReviews 6 is in a transition period, so it currently has two separate language systems running side by side:
- Early Access features use a newer system based on PHP files. This is what the rest of this page covers.
- All other features still use the older
.polanguage files, covered in the JReviews 5 documentation.
In both systems you only define the text you want to change — everything else keeps using the built-in wording, so you never copy an entire file. The two systems are completely separate, though: a change you make in one has no effect on the other.
Which Features Use the New System
The newer system applies to these Early Access features:
- New Listing Detail Page — complete rewrite including media manager, comments/reviews, and addon integrations
- New Listing Form — rewritten form with integrated media uploads
- PaidListings Checkout — new one-step checkout flow
If a page is not part of Early Access, its text still comes from the older .po system. The quickest way to tell which system a page uses is the Theme Explorer: pages built with .blade.php templates use the newer language system, while .thtml templates use the older one.
Language Files
The text for the newer system is stored in PHP files. Each language has its own folder, named after the language code (en, de, and so on), and the text is split into two files:
site.php— text shown on the website front-endcp.php— text shown in the administration area
JReviews itself uses the jreviews namespace, and each add-on comes with its own language files under its own namespace:
.../jreviews/resources/lang/en/site.php
.../jreviews/resources/lang/en/cp.php
.../jreviews_addons/ADDON_NAME/resources/lang/en/site.php
Each piece of text has a key that the templates use to look it up. Keys follow the namespace::file.key format:
<button>{{ fwd__('jreviews::site.actions.save.label') }}</button>
<h2>@lang('jreviews::site.headings.user_reviews')</h2>
Reading jreviews::site.actions.save.label from left to right:
jreviewsis the namespace (JReviews itself, or an add-on)siteis the file the text lives in (site.php)actions.save.labelis the path to the text inside that file
Language Detection
JReviews uses the language you set on your site, the same one that controls the rest of JReviews:
- On Joomla, this is your site language, for example
en-GB - On WordPress, this is your site language, for example
en_US
JReviews converts that to lowercase and swaps the dash for an underscore (en-GB becomes en_gb), then looks for a matching language folder. If there is no folder for that exact region, it falls back to the plain language folder (en_gb falls back to en), and finally to English (en).
Language Overrides
To change any text on Early Access features, create your own PHP file containing just the text you want to replace. Your version is layered on top of the built-in files, so you only include the keys you are changing — everything else stays as it is.
Override Locations
Place override files inside the JReviews overrides directory for your CMS:
- Joomla —
templates/jreviews_overrides - WordPress —
jreviews_overrides
There are two override scopes.
Global overrides apply across Early Access features:
templates/jreviews_overrides/resources/lang/en/site.php
jreviews_overrides/resources/lang/de/site.php
Vendor-specific overrides apply to just one namespace (JReviews itself or a specific add-on), which helps keep your changes organized when you have several:
templates/jreviews_overrides/resources/lang/vendor/jreviews/de/site.php
templates/jreviews_overrides/resources/lang/vendor/mylists/de/site.php
Override Priority
When the same key is defined in more than one place, JReviews uses them in this order, with the last one winning:
- Built-in files — the original text that ships with JReviews and each add-on
- Global overrides —
resources/lang/{language}/{file}.php - Vendor-specific overrides —
resources/lang/vendor/{namespace}/{language}/{file}.php(wins over the others)
Any text you don't override simply keeps its built-in wording, so a small override file with only your changes is all you ever need.
Override Example
The dots in a key map to nested levels in the file. To change the User reviews heading and the save button label, create resources/lang/en/site.php in your overrides directory with just those two keys:
<?php
return [
'headings' => [
'user_reviews' => 'User evaluations',
],
'actions' => [
'save' => [
'label' => 'Save Changes',
],
],
];
For a German translation, create the same structure in resources/lang/de/site.php:
<?php
return [
'headings' => [
'user_reviews' => 'Benutzerbewertungen',
],
'actions' => [
'save' => [
'label' => 'Speichern',
],
],
];
Finding Language Keys
To find the key behind a piece of text you want to change:
- Look in the templates — search the templates for
fwd__('jreviews::site.…')or@lang('jreviews::site.…')to find the exact key being used. - Browse the built-in files — open
resources/lang/en/site.php(orcp.php) in JReviews or the relevant add-on to see all the available text and how it's organized. - Use the Theme Explorer — turn it on to see which templates build a page, then look up the text in those files.
In your override file, recreate the same nesting as the key. For example, jreviews::site.form.title.label becomes:
return [
'form' => [
'title' => [
'label' => '...',
],
],
];
Per-Listing-Type Language
On the older pages you can change wording per listing type — for example, showing Edit Property Details instead of Edit for a Real Estate listing type. The Early Access pages don't offer this yet: any text you set in site.php applies to every listing type that uses the new pages. If you're moving over from the older pages, keep in mind that wording you had set per listing type will become the same everywhere on the Early Access pages.
Testing Your Language Overrides
So if you want to switch off a language change — for example, to check whether a problem is coming from your edits — remove or rename your site.php / cp.php override file and clear the cache. The original text will come back.
Multilingual Sites
While you can run JReviews in any language, JReviews is not a multilingual system. A true multilingual setup requires translating setup data (categories, fields, listing types, etc.) and user-generated content (listings, reviews, comments), filtering content by the visitor's language, and letting users search within a language. JReviews does not provide this, which is why it is not marketed as multilingual.
Some sites use Google Translate based solutions so visitors can switch languages quickly. That provides basic multilingual browsing, but it does not enable searching across languages.
Related Documentation
- JReviews 5 Languages & Localization — the older
.polanguage files, used by features not yet rewritten for Early Access - Customizing Early Access Features — how to customize the templates (layout) of Early Access pages
- Early Access Features — an overview of all Early Access features