![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 500 Pomógł: 1 Dołączył: 29.09.2009 Ostrzeżenie: (0%) ![]() ![]() |
Witam, próbuję na swojej stronie utworzyć moduł zmiany języków. Posługując się dokumentacją: http://symfony.com/doc/current/translation.html ustawiłem
config.yml Kod framework: translator: { fallbacks: [pl] } Utworzyłem plik w app/Resources/translations/messages.gb.xlf z zawartością: Kod <?xml version="1.0"?> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file source-language="pl" datatype="plaintext" original="file.ext"> <body> <trans-unit id="Czesc"> <source>Cześć</source> <target>Hello!</target> </trans-unit> </body> </file> </xliff> Następnie w twig zrobiłem Kod {% trans %}Cześć{% endtrans %} Moduł zmieniania języków ogarnąłem, widzę w debugerze, że _locale się zmienia, jednak nie tłumaczy mi tej frazy "Cześć". Dostaję w debugerze info o brakującym tłumaczeniu. Co zrobiłem źle? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 06:28 |