There doesn't seem to be a way to programmatically declare in an XForm / XLSForm an ODK Collect client-specific function to determine the language that is currently selected in the client.
A way to programmatically declare in an XForm / XLSForm an ODK Collect client-specific function to determine the language that is currently selected in the client, e.g.
if(client-language() = 'English', 'hello!', if(client-language() = 'Spanish', 'hola!', ''), '')
Right now it would be useful as a hack around the inability to use
jr:choice-name() on external csv's (including external_choices). So perhaps it would be better simply to implement that change instead. There is an open issue: https://github.com/opendatakit/collect/issues/179
Otherwise, I'm not sure. I feel like I've wanted this in the past, but I don't remember any other specific example.
With perhaps some guidance, I may be able to contribute to the JavaRosa source code, but my understanding on how this would be implemented is minimal. I was mostly thinking that something like this would be ignored by JavaRosa, and handled by specific clients.