MetaLocator allows you to control all customer facing language. This includes items like the words 'Submit', 'Reset' and 'Postal Code' as shown here:
MetaLocator provides the ability to display your Interface in any language you choose. If you simply want to change the word "Submit" to "Search", or "Postal Code" to "Zip Code".
The process begins by checking the interfaces Search Form and looking for the language constant for the Postal Code. This can also be found in the language file and then added to the interface elements if it does not exist yet.
Next click on Language from the MetaLocator Control Panel. The Default Language file for an interface is English (en-GB). Interfaces that use different language file as their default will appear listed under the language file.
If you have not created any overrides yet, edit the Default Language (English) or create a new language file by clicking New in the upper right. When you save your changes, a copy (or override) will be created based on the Default Language.
Each language file is structured with a series of "constants" on the left, and the displayed language on the right. Edit the language as needed to use your desired language. Click Save when complete.
If you were editing the Default Language file, a new Language File was created for you when you clicked Save. Your edits will be saved in that new Language File. If you have additional changes to make, make them in that new file. If you would like to create a new, separate language file based on the Default Language file, edit the Default Language file and when it is saved, yet another new override language file will be created with your edits.
Now that your new language file is created, you must update your interface settings to use that new file. Under Interfaces, find the Interface you would like to use this new language file and click the name of the Interface to open the Interface Editor.
Your new Language File override will be listed as shown above. Choose the new language file from the list and click Save in the above.
For sites that use one interface for multiple languages use Deep Linking to pass the language file to each page.
To translate Category labels, see this tutorial.
Translating Data
To translate the content that appears in data-driven drop-down lists, such as "State", "Country" or a custom field, MetaLocator will look for a language constant following this format:
LOCATOR_DATA_SAFENAME
Where "SAFENAME" is the "safe" version of the data value found in that field. For example, if your country drop-down list contains "United States" and you want the Spanish language version of your Interface to display "Estados Unidos", create a language constant as follows:
LOCATOR_DATA_UNITEDSTATES
Ensure that language constant is provided and translated within each language file.
Translating Field Names on the Public Submittal Form
To translate or change field labels on the public Submittal Form, create language constants using the following format:
LOCATOR_FIELD_SAFENAME
Language file changes may take up to 15 minutes to propagate to your Website. The Interface Preview will show the changes immediately.
Translating drop-down list prompt values
MetaLocator looks for the LOCATOR_SELECT constant when populating the "Please select..." option present in nearly every drop-down list generated by the system. However, if a constant following the naming convention LOCATOR_SELECT_SAFENAME is found, the system will use that instead. This allows users to customize the prompt on a per field basis. To change category drop-down list prompts, provide a constant in the form of LOCATOR_SELECT_CATEGORY_GROUP_SAFENAME, where SAFENAME is the "safe" version of the category group name. If you are not using category groups, provide a constant as LOCATOR_SELECT_CATEGORY.
Translating drop-down list prompt differently on the Form Layout
After applying the logic above, MetaLocator looks for a constant in the format of LOCATOR_SELECT_SAFENAME_DIRECTORY or LOCATOR_SELECT_SAFENAME_LOCATION. This allows you to control the prompt in the context of the search results (directory) or a Location Form Layout (location).
Displaying a Language option the in Search Form
Add {languagedropdown} to your Search Form format under Form Settings. A drop-down list with each language override in your account will be displayed. If your interface is set to "Select language from Browser" as found under "Language & Internationalization Settings" the drop-down will be initialized to the browser's language, presuming a matching translation exists.
Configuring radius and distances in kilometer or mile units
The language file contains settings for the mile and kilometer labels: LOCATOR_K, LOCATOR_M representing Kilometers and Miles accordingly. Values for these constants can of course be changed.
In conjunction with these constants, the language file can be made to control the units for distance and the search radius. Add the constant LOCATOR_DISTANCE_UNIT to the language file associated with the Interface and specify either LOCATOR_K or LOCATOR_M as the value.
Identifying Right-to-left Languages (RTL)
Some languages, such as Hebrew are written from right to left. In these cases the locator itself switches display to orient properly for a right to left reader.
In these cases, a special language constant indicates to MetaLocator that the language should trigger the RTL display:
LOCATOR_RTL="true"
In this case, the HTML "dir" attribute is updated causing the browser to mirror the display, text output and typing direction.
Including Double Quotes in the Language String
Double quotes within the language string should be escaped using a backslash as in:
LOCATOR_EXAMPLE="This is an \"escaped\" string"
In the language editor, no escaping is necessary