Read the current language
pom_translate_get_current_language(): string returns the locale resolved for the current request. The first call detects and stores it for subsequent calls in that request.
$locale = function_exists( 'pom_translate_get_current_language' )
? pom_translate_get_current_language()
: get_locale();
The result can differ from the WordPress administration locale. It may come from a localized path, an explicit supported REST/AJAX context, a temporary override, or the base-language fallback.
Use it to choose already registered multilingual values or cache variants. Do not use it as authorization and do not assume it represents a customer's preference in a cron or queued job.
Escape only values rendered from the locale, not the locale itself as a substitute for validation. When passing it to another API, verify that it appears in pom_translate_get_available_languages().