Getting the ISO Code what is being used by translate()

Hi All,

Im doing a full page extension and I get some localized content from an external server, in order to be able to get the correct localized content I need to pass the locale of the logged in customer.

I am using useAPI() to correctly translate the text of all the components via the locales json files so the right locale is being used, the issue is I don’t know how to get access to the iso code.

I tried to use useExtensionLanguage() but that returns EN where translate is returning the DE text.

Am I missing something?

Cheers,
Gary

ok wrong api.

its useLanguage() if anyone didnt try all variations before starting to look