- Your data must be available in each language. Addresses, descriptions and all other data must have a counterpart for each available language
- You must translate the text found in user interface elements such as the "Submit" and "Reset" buttons (if applicable)
- You may consider the use of Imperial versus Metric distance measurements in both the search interface and driving directions.
Let's start with item #1, preparing your data. This tutorial assumes that you are familiar with the basics of importing data. If not, please see our Quick Start Guide and support documentation for further guidance on that process.
Importing a multi-lingual data file will involve two additional considerations. First, your data file must be UTF-8 encoded. Characters such as β and ɸ must be appropriately formatted as UFT-8 for them to display and store correctly. Notepad++ is a free software program that will create a UTF-8 encoded CSV. Secondly, your import file must include an appropriate value in the language column. The value of that column must conform to the format of aa-BB, where aa is the ISO language code and BB is the ISO region code. Common examples include:
- en-GB (British English)
- en-US (United States English)
- de-DE (German)
- fr-CA (French Canadian)
- es-ES (Spanish)
Usage if these language codes allow MetaLocator to unambiguously assign the appropriate rendering methods to the maps and text displayed within our software.
Our example data file will include two languages, German (de-DE) and US English (en-US). Note the highlighted language column, and also the two German language locations. Ideally, you should provide each location in each language you intend to support.
These locations happen to also be located in Germany, but MetaLocator's language features are completely independent from an individual record's location. You may have German language records with US addresses, Spanish language locations in the UK and so forth.
Once you have prepared your language file, you can import it in the usual way, and then observe the list under Data > All Records now contains a language column with the values you have imported as shown here:
Now that your data is imported, we need to create a language file for our German visitors. To do that, first click "Language", then "New" in the toolbar. Choose "German Standard", then "Save". This will copy the default (en-GB) language file and give you the opportunity to translate each entry as needed. Depending on the features in use, you may not need to provide a translation for each entry.
It's worth noting at this point that MetaLocator does not provide language translation services. However, Google Translate does an excellent job for some common phrases.
Update each entry as shown here, and choose "Save" when complete.
You now have two language files, one for your German visitors and one for your English-speaking visitors.
Next you must create two interfaces, one for English and one for German. In each interface, update the following settings accordingly:
This interface is now configured to use the German (de-DE) language file we created and it is also set to only display locations with the de-DE value in the language column. Additionally, the Google Maps interface will be displayed with German language conventions.
Those are the essential steps to creating a multi-language interface. You should now copy and paste code from each interface on your Website in the appropriate area.
The finished product looks like this: