Modify Text in Language Menu

25 просмотров
Перейти к первому непрочитанному сообщению

r.ruti...@docuteam.ch

не прочитано,
25 мар. 2021 г., 11:30:4625.03.2021
– AtoM Users
Hi all,

Does anybody know how to change the text of the items in the language menu (top right in the header)?

lang-atom.JPG

Would I have to modify the .dat files in vendor/symfony/lib/i18n/data?

I hope not ;-)

best regards
roger

José Raddaoui

не прочитано,
25 мар. 2021 г., 12:54:2425.03.2021
– AtoM Users
Hi Roger,

Those language links are generated here:


You could make some modifications in there, for example to capitalize the first letter, but be careful with unexpected issues with languages like Chinese. You could also change the second parameter of format_language to the current culture if you want to show them all in the selected culture. As you said, further modifications may require changes to the .dat files.

I hope that helps.

Best regards,
Radda.

r.ruti...@docuteam.ch

не прочитано,
25 мар. 2021 г., 18:46:1425.03.2021
– AtoM Users
Hi José

Thanks a lot for the hint. I managed to include it in my custom theme, like this:

<?php echo link_to(ucwords(format_language($value, $value)), array('sf_culture' => $value) + $sf_data->getRaw('sf_request')->getParameterHolder()->getAll()) ?>

You were right, I wanted to capitalize the first letter ;-)

best regards
Roger
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений