How to export one part and expose 2nd part to northbound interfaces like rest/webui

Hi,
I want to expose few leaf from the model to rest interface and keep remaining open for all the interface.
I have seen Hiding yang nodes from northbound interfaces that splitting it will help.
But here I am facing problem that once module is exposed to one interface, all the leaves are inherited even it is split.
Ex.

augment "/data:input" {
module file-language-model {
container language {
        leaf english {  ((( want to keep it only for rest interface )))
        }
        leaf hindi {
        }
  }
}

I tried to split it into two parts while keeping tailf:export in 1st where I was restrict it to only one interface and kept other as open for all other interface.

1st part :

tailf:export rest;
augment "....." 
container language {
        leaf english {
        }
  }
}

2nd part :

 container language {
        leaf hindi {
        }
  }
}

I have tried to keep tailf:export all in 2nd part just to keep it exposed to all interface.

I also tried to keep tailf:export inside leaf, but that it was giving compilation error as not allowed.

I thinking tailf:hidden can help in hiding data for cli but is there any way that only some part is exposed to interface like rest or webui ?
or can I use tailf:export inside leaf ?

I think this is a misunderstanding of what the referred post suggests. Your two modules should look like this:

module file-language-model {

  container language {
    leaf hindi {
    }
  }

}

and

module file-language-model-a {

  import tailf-common {
    prefix tailf;
  }

  import file-language-model {
    prefix flm;
  }

  tailf:export rest;

  augment "/flm:language" {
    leaf english {
    }
  }

}

This way the leaf english, a subleaf of the container language, is rendered only for the REST (or RESTCONF; note that the old REST API has been removed in ConfD-7.4) interfaces.