thank you sir!
wpm_get_language saved my day. You really should add this function to github readme/docs
-
This reply was modified 8 years, 3 months ago by dcrystalj.
Thank you.
I managed to write helper for this:
function wpm_trans_exists($str, $lang) {
if (!wpm_is_ml_string($str)) {
return false;
}
preg_match('/\[:'. $lang .'\]/', $str, $matches, PREG_OFFSET_CAPTURE, 0);
return count($matches) > 0;
}
do you know how can i get current selected language string? like ‘en’ ?
-
This reply was modified 8 years, 3 months ago by dcrystalj.