Hide or Show Text objects from ui.button

I’m trying to implement different languages.
i have a canvas showing numerous buttons, almost 100 buttons. most of which are turned off, until another buttons turns them on.
each button has 2x textmesh pro objects. 1 English, 1 French.
in my options i want to click on my french button and it turns off all English text and turns on all French text. All English text is tagged “English” and the French is tagged as “French”

Using a script i can hide some of the English tagged objects, but only for game objects that are active. its does not hide text that is a child of a button that is currently hidden. So when i turn a new button on, the English text is visible but cant unhide (Set active True) the french tagged objects. so i just have buttons with no text.

Any ideas on how i can achieve this would be grateful. i would like to use tags as there is just so much text objects.

So its almost working, i just need to be able to hide / Setactive false objects that are child of game objects that are turned off.
below is the code i’m using

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ShowFrench : MonoBehaviour
    public GameObject[] english;
    public GameObject[] french;

    void Start()

        english = GameObject.FindGameObjectsWithTag("English");
        english = GameObject.FindGameObjectsWithTag("French");


    public void Disable()
        foreach (GameObject e in english)



    public void Enable()
        foreach (GameObject f in french)



Hm, are you sure having all these duplicate gameobjects is the way to go?

Either way: I would suggest a small script on each button that can hold either two strings or two gameobject references to your textobjects, which either set the text of a textmesh object or enables the appropriate text node. You can put a public function in there that handles this setting of the right text and have it called automaticly on OnEnable();
Then put a script on the root of your canvas that can search for all these scripts and call that public method in case you need to toggle languages at runtime.

And I would recommend using strings that set a single textmesh rather than toggle between two textmeshes. Less Gameobjects in your hierarchy. Also; if you have some localization class like that on your textobjects that simply sets the text you can later choose to have those refer to some localization text file via an index and can then easily add more languages.

aww im with you now. i have added the script to the first bit of text, and filled in what i want the English text to be and the french text. my empty text object then automatically fills in when i hit play, perfect!

Could you explain again, the other script i now need to add onto my french language button to toggle the from int 0 to 1. which i believe would remove all 0 English text and write 1 french text.

i’m very close now thank you.

unfortunately i am on my own with this, as we have no coders at work.