I’m trying to add translation for content that’s stored within a custom table.
I do this by using the following snippet from the documentation:
do_action('wpml_register_string', 'custom string', 'string_name', [
'kind' => 'Custom String',
'kind_slug' => 'custom-string',
'post_id' => 123,
'title' => 'The String',
'name' => 'string_name',
], 'My String', 'LINE');
Things are going well, the translation is picked into the ATE[1], all good.
However, this is a part of a system that will need some migration, therefore I’ll need to insert few tens of thousands of translated strings, so doing it manually it’s not an option.
What I’d also like to do is: given the string_name
string defined above, how do I insert translation for that string and mark it as completed on ATE?
I’ve found some leads by stepping into the code, but I hope there is a slightly easier way than rebuilding half of the ATE ????
[1]: advanced translation editor