php - CakePhp i18n translation words order in .po files -
currently in view have this:
<span style="color: #2363a2;"><?php echo __('accèdez à tous les %spronostics%s d\'%s', '<span style="font-weight: bold; text-transform: uppercase">', '</span>', appcontroller::getsitename()); ?></span>
in .po file have this:
msgid "accèdez à tous les %spronostics%s d'%s" msgstr "reach %s %spicks%s"
the translation (from french - msgid - english - msgstr -) wrong.
the 1st %s value in msgstr should 3rd %s value in msgid. did researches related i18n cakephp didn't find nothing related issue.
do know how 'set order' of translated %s ?
thanks.
i've had issues in past when passing replacement arguments multiple function arguments. using array tends more reliable:-
__( 'accèdez à tous les %spronostics%s d\'%s', [ '<span style="font-weight: bold; text-transform: uppercase">', '</span>', appcontroller::getsitename() ] )
update:
you need specify correct order in translated string this:-
msgid "accèdez à tous les %spronostics%s d'%s" msgstr "reach %3$s %1$spicks%2$s"
using %3$s
tells cake of parameters use integer number represents original ordering.
Comments
Post a Comment