Change Regions and cities language

Hello,
I have more than language in my osclass website, and when i add regions and cities they are in english language, how i can translate these into another language, because its still in english when i change to another language ?

thank you for answer or guide me

You can’t translate. If you need to have a multiple language Osclass site, you need to install other languages into subdomain like /de/ /nl/ /ru/ etc.

Than you can go to locations on dashboard and rename those countries and cities as original. this is only solution for current osclass.

You can translate the languages with .po/.mo files.

Example for city helper. Instead of this:

function osc_city_name() {
    return osc_field(osc_city(), 'city_name', '');
}

You put this:

function osc_city_name() {
    return __(osc_field(osc_city(), 'city_name', ''));
}

And then in your core.po file you put city names in default language and translate them.
Maybe you can specify ‘location’ as second argument of “__” function and have translations in location.po file.

thank you for reply, sorry but i d’ont understand, the po/.mo files. of what? cities are not mentionned in core files… and about function too i didn’ understand…
could you please specify wit details? if it’s not too much for you, i will be grateful
algeriahome

I have already told you; it is difficult that way…If you want to have multiple language osclass , than you need to install osclass into each language folder / de/ ru/ Uk / etc…
than into their dashboard, you can rename city / region names.