Osclass Themes and Osclass Plugins

How to Translate Locations in Osclass

How to translate locations into native language formats and validate output for multilingual classifieds usability. Feature is available from Osclass 4.1 or higher.
Case Studies & Real Implementations
6. April 2026
2 min read
15282 views
How to Translate Locations in Osclass

Quick overview

How to translate locations into native language formats and validate output for multilingual classifieds usability.

What this article covers

  • Location translations into native language
  • Translate location
  • Enable native name selected languages/locales
  • Preview translated locations

Practical notes

  • Validate changes in staging before production updates.
  • Track user impact with analytics, logs, and search performance signals.

Location translations into native language

Latest major release of Osclass brings ability to translate language into native form. This may be especially beneficial in case you use different alphabet on site (english/russian, english/arabic, english/japan, ...).

Translate location

Go to Oc-admin > Settings > Locations:

Osclass locations setting

Click on country, region or city to open edit pop-up window. Here you can define native name for location:

Classifieds script osclass - translate location

Once you've entered native name, click on submit button (Edit city / Edit region / Edit country) to save your changes.

Your location now has it's native name in native language.

Enable native name selected languages/locales

You've already translated locations to have native name. By default this is not shown and must be enabled for particular languages. As above example shows, we are translating locations into Russian native naming, it does not make sense to show it in native form for visitors having english language selected, it make sense to show it only to visitors having Russian language active.

Go to Oc-admin > Settings > Languages

Classifieds script osclass - change language

Click on edit button for language you want to enable native location names:

Classifieds script osclass - manage languages

Check "Native location names" and press Save button:

Classifieds script osclass - language native location name

Preview translated locations

Now go to your site (front). In English, location names will not be changed. In Russian, it will show native name.

English:

Classifieds script osclass - location in english

Now switch your language to Russian and refresh page.

Russian:

Classifieds script osclass - location in russian

We've translated city "Aleyskiy Rayon" into "Алейский район".

Note that locations without native name will show original name, so you may translate just several cities/locations and rest keep empty to use their original name.

Specific theme functions might need update to properly show native name, if it exits.

Please take a look on integration guide:
Location translation integration guide

Related: our geolocation rebuild and translating themes and plugins.

Frequently asked questions

Question: Where do I type a native city name in Osclass 4.1 Locations settings?

Answer: Open oc-admin, Settings, Locations, edit the city, and fill the native name field. Save with Edit city. Osclass 4.1 stores that value next to s_name. Empty native falls back to the original name, so you can translate only some cities. Confirm the locale switch before you expect it on search.

Question: Why does English still show Latin city names after Russian native names in Osclass?

Answer: Enable Native location names only on the locale that should show them, under Settings, Languages. English can stay on Latin s_name. Switch the front office to Russian to preview the native string; Osclass 4.1 does not force English to use native names. Save both the city and the language checkbox.

Question: Can I translate only some Osclass cities to native names?

Answer: Fill s_name_native for a few cities and leave the rest empty. Osclass shows s_name when native is empty. Enable the native switch only on the locale that should see those names; you do not need a full country translation first. Open search in that language to confirm the string.

Question: How do I preview Russian versus English location names in Osclass 4.1?

Answer: Keep English without Native location names, enable that checkbox on Russian, then open the same search page in each language. Osclass 4.1 prints the native string only on Russian. Cities without a native value still print s_name on both languages. Theme helpers must call the native-aware functions.

Question: What if my Osclass theme ignores native location names?

Answer: Some theme helpers still print s_name only. Osclass 4.1 added native-aware functions, and the theme must call them. If the locale switch is on and the city has a native value but the page is still Latin, update those theme function calls. Check a search URL in the native locale.

Question: What is the difference between Osclass native location names and theme .po translation?

Answer: Native location names are fields on country, region, and city rows in Settings, Locations. Theme .po files translate buttons and labels in the theme languages folder. Filling de_DE.po will not rename a city. Use the Locations native field for that. Keep gettext for UI strings only.

About the Author

My passion is building classifieds marketplaces, automating workflows, and turning messy data into useful products. From PHP, HTML, CSS, and JavaScript to Python, crawlers, imports, and SEO, I enjoy solving technical challenges and sharing lessons learned from real-world projects. Most ideas start with a problem, a cup of coffee, and a curiosity to see how far automation can go.
Osclass, PHP, JavaScript, CSS, Python
52 posts Publishing since 04/2018

Shopping cart
Support tickets Downloads Reviews Orders & Invoices Payments
Dashboard My profile Change password Download user data
Logout