One locator, several languages
Every label in the locator โ the search box placeholder, the buttons, the messages โ can be written in more than one language. Each visitor sees the closest match to the language their browser asks for, and anything you have not translated falls back to your own wording.
Your primary wording is what you set in Appearance โ Labels. A language you add is an overlay on it, never a replacement, so a locator you have already customised keeps reading exactly as you wrote it for everyone whose language you have not added.
Add a language
In Appearance โ Labels, add a language by its code and fill in the labels you want translated. You do not have to translate all of them: a half-finished language shows the translated controls in that language and the rest in your primary wording, which is usable while you work through the list.
Codes are standard language tags: es for Spanish, fr for French, pt-BR for Brazilian Portuguese. Case does not matter.
How a visitor is matched
Browsers send an ordered list of the visitor's preferred languages. Handled walks that list in the visitor's own order and takes the first language you offer that fits:
- An exact match wins. A visitor asking for
es-MXgets youres-MXlabels if you have them. - Otherwise the base language matches:
es-MXacceptses. - A different region of the right language is still a match: a visitor asking for
es-MXis better served by youres-ARlabels than by English. - The visitor's own priority is respected over closeness. Someone asking for French first and Spanish second gets French, even if your Spanish is a closer regional fit.
If nothing matches, they see your primary wording.
What is not translated
This translates the locator's own interface, not your data. A location's name, description, custom fields and category names are stored once and shown to every visitor as you wrote them.
That is usually what you want โ a store is called what it is called โ but it does mean a fully Spanish experience needs Spanish descriptions written into the location records themselves.
Running in a single non-English language
If you serve one language that is not English, you do not need this at all. Rewrite the labels in Appearance โ Labels and the whole locator is in that language for everyone. Add languages only when you need to serve more than one at the same time.