A
A
andrey69rus2018-05-22 12:47:24
WordPress
andrey69rus, 2018-05-22 12:47:24

How to make plural translation display normally in wordpress widget?

I can’t understand why the translation in the plural is not displayed correctly in the widget, although in the admin panel all
the lines from the localization file are OK

msgid "%d image"
msgid_plural "%d images"
msgstr[0] "%d изображение"
msgstr[1] "%d изображения"
msgstr[2] "%d изображений"

information output
echo  sprintf( _n( '%d image', '%d images', $images_count, 'galleries' ), $images_count ) ;

in the admin panel, everything is displayed OK
HkozDPWy7.png?i=1
in the widget like this
ryJCLv-y7.png?i=1
, what is the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question