string registered with pll_register_string disappears
-
I’m trying to integrate Polylang into one of my plugins. When I register a custom string using pll_register_string() function I can see it show up in the Translations tab but then the string disappears from the list if I refresh the page. I can reproduce this easily by adding the following code in my theme, and then commenting out the pll_register_string() later to see if the string persists.
function test_polylang() { if ( function_exists( 'pll_register_string' ) ) { pll_register_string( 'test', 'test value', 'my-text' ); } } add_action ( 'admin_init', 'test_polylang' );Am I doing something wrong or have I misunderstood what the pll_register_string() function does? I am trying to replicate WPML string translations. Note: I already have a wpml config file but the strings I’m trying to register are added by the admin user.
Thanks,
Daniel
The topic ‘string registered with pll_register_string disappears’ is closed to new replies.