How to register in PolyLang row from repeater?

There are blocks that are output from the repeater(repeater).
Is it possible to automate the process of adding rows from a repeater in pll_register_string,
so you wouldn't have to register them yourself ?

That is, that the client himself added a line through the admin panel and it immediately tells you in pll_register_string
Tried here so, but it didn't work (new strings for translation did not appear) :

In functions.php:
foreach( get_field('images-gallery') as $image ) {
 pll_register_string( $image['alt'] , 'Translation of descriptions of galleries', 'text Translation');

images-gallery - repeater consisting of a picture + description( ['alt'] )
April 7th 20 at 15:34
1 answer
April 7th 20 at 15:36
He will reply if someone faced to the above problem was solved, just need to add the post ID to the get_field call, because the afc does not know which page to take the field entries.

foreach( get_field('images-gallery', $ID) as $image ) {
 pll_register_string( $image['alt'] , 'Translation of descriptions of galleries', 'text Translation');

but ID like to expose to You to decide), I took out the admin just the numeric value I need pages. The solution is not the best, if I delete the page you lose your place, but otherwise I don't know yet)

Find more questions by tags WordPress