Determining the language of the current user's application installation

No question, just a post to share information to help others determine the language that the user has the application the application with.

In ExtendScript you could use $.locale to get something back like “en_US” - at least in Adobe InCopy and Adobe InDesign

With UXP, if you have const host_o = require('uxp').host;

then in Adobe InDesign host_o.locale will provide the same “en_US”

But in Adobe Photoshop you need host_o.uiLocale to get that same “en_US” value, or whatever language is installed.

True!
A while ago I was looking for a way to set the locale to test ZStrings, but it didn’t work—in the end I provided translations and used them instead.

Well, this has changed with Adobe InDesign 19.0.
Rather than my original post for .locale in InDesign 18.5 it is now .uiLocale. On the plus side, it now matches the Adobe Photoshop method.