Topic: Changing the language of the map via script

I'm trying to change the language of my map to french via script (as my app has both french and english options) using OnlineMaps.instance.language = "fr"
In the Inspector I can see that the field has been changed to show 'fr', but the map is still in English.
What am I doing wrong? sad

Re: Changing the language of the map via script

Hello.

What provider do you use?

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Changing the language of the map via script

Right now we are using Google Maps, but we might change to a different provider later.
Is the method very different for different providers?

Re: Changing the language of the map via script

Hello.

It uses the same method for all providers, but not all providers and the types of map supports multi language.

I just checked it. Everything works well.
Test script:

using UnityEngine;

public class ChangeLanguageExample:MonoBehaviour
{
    public string[] languages = {"en", "fr"};

    private int languageIndex = 0;

    private void OnGUI()
    {
        if (GUILayout.Button("Change Language"))
        {
            if (++languageIndex >= languages.Length) languageIndex = 0;
            OnlineMaps.instance.language = languages[languageIndex];
        }
    }

    private void Start()
    {
        OnlineMaps.instance.language = languages[0];
    }
}
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Changing the language of the map via script

It still isn't working for me, for some reason.
Even if I enter 'fr' directly into the inspector, it still won't use the French version.
It's not imperative to the app, so it will be fine, but I was hoping to make it work hmm
Thank you for your help

Re: Changing the language of the map via script

Perhaps, did you lookin at location that does not have a French version.
Try as much as possible zoom out the map (zoom = 3).

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Changing the language of the map via script

Oh shoot. You're right. There just isn't a French version for my area.
(which is funny, because I come from Canada, and English and French are our two official languages)

Thank you for your help all this time