i am trying to auto register string in wordpress, but for some reason it doesn’t work
it works when i call in the code of the theme:
esc_html_e('mytext','mythemename');
and then do
WPML->theme and plugins localization->strings in the theme->scan the theme for strings
then mytext appears in strings list for translation
but if i try instead to enable:
wpml->string translation->auto register strings for translation->auto-register strings always->apply
and in the code run, f.ex.:
$myvar='mytext';
esc_html_e($myvar,'mythemename');
then, of course, i go to wp page where string appears, but nothing happens, string doesn’t get added to theme strings list
does anybody know if i am doing something wrong?
it started adding the strings when instead of esc_html_e i wrote:
i’m sure there is more elegant solution but since this one works it’ll do for now.