How to translate SP Property phrases | Empire - Documentation | JoomShaper

Empire

Updated Last: 20 March 2023

How to translate SP Property phrases

SP Property - is a complete Real Estate extension (component with modules) for Joomla! 3.6+. It allows you to manage and list Properties, Agents, use search filter and booking option is available as well. Great tool for all real estate agents and real estate agencies. In following guide we will show you how to translate and make basic customization.

Front-end and back-end translation

SP Property is a Joomla! component with language files separate for front and back-end. Quickstart and/or com_spproperty_fullpackage_v1.x package includes files (.ini) which contains all of the English terms we have used. Below example .ini file:

This allows our users to only edit one file in order to be able to translate our templates to any language in the world. QuickStart is using SP Property component with two modules, it means that you have to translate them if you want to use it in 2nd language.  All you have to do is to translate all 3 files or only selected (needed) files. :

  • Main component (front-end)  : language\en-GB\en-GB.com_spproperty.ini
  • Property Search (module) : language\en-GB\en-GB.mod_spproperty_search.ini
  • List of properties (module) : language\en-GB\en-GB.mod_spproperty_properties.ini

And component back-end phrases are stored here:

  • administrator\language\en-GB\en-GB.com_spproperty.ini
  • administrator\language\en-GB\en-GB.com_spproperty.sys.ini

How to translate language files

Remember that instead of changing the original file, you can to make a copy of this file (from the server, template quickstart or component package). Open the .ini file with a text editor which is capable of handling UTF-8. Each HTML will be good for this purpose. You can also use free tools, like: Notepad++  if you are using a Windows operating system. A good start is to make sure that you’re using UTF-8 encoding. Now, you can translate selected entries into your preferred or native language. Edit the file and translate phrases on the right side of the equals (=) sign to the new language. The left side of each line (left of the equals sign) must remain the same – they are needed by the system. You don’t have to translate all strings from that file, select only those you really need. Each translated string must be enclosed by double quotes, always !

Then, you have to change the filename :
from: en-GB.com_spproperty.ini
to: xx-XX.com_spproperty.ini

Where xx-XX is a LANG-PREFIX, for example es-ES – for Spanish (Español).

Once the phrases inside file have been translated, you can copy your language file into your language directory using an FTP client. That's all.

How to translate selected phrases

You can translate only selected phrases, using Joomla! Language Override, in Joomla (Top Menu): Extensions > Language Manager > Overrides tab. In the Language Constant input field insert, for example: “COM_SPPROPERTY_PROPERTIES_SQFT” without quotes – then in next field your translated phrase, for example, sqmtr.

 

Popular phrases

(metrics & others from front-end):

MOD_SPPROPERTY_PROPERTIES_SQFT="Sqft"
COM_SPPROPERTY_PROPERTIES_SQFT="Sqft"

COMPROPERTY_PLACEHOLDER_FULLNAME="Full Name"
COMPROPERTY_PLACEHOLDER_PHONE="Phone Number"
COMPROPERTY_PLACEHOLDER_EMAIL="Email Address"
COMPROPERTY_PLACEHOLDER_SUBJECT="Subject"
COMPROPERTY_PLACEHOLDER_MESSAGE="Message"
COM_PROPERTY_FORMBTN_SUBMIT="Submit"

 ...