Kdyby Translator – Translation of static files from the database

about a month ago

dan_slama
Member | 2
+
0
-

Hello, I have this problem with the translation of my administration. There are some basic library names like “Obrázky”, “Videa”, … loaded from the database. In Latte files I need them to be translated to English if English language has been selected but if the website is in Czech I want them to stay the same without the prefix ui.general..... Is there a way to do that?

--English Translations–
general:
“Obrázky”: “Images”
admin:
 menu:

--Czech Translations–
general:

admin:
menu:

about a month ago

chemix
Gold Partner | 1063
+
0
-

@dan_slama imho NO. Because this is not the final translated text, but only index to path where to find the final translated phrase (for all languages, not for "only second one). It's specification of Symfony/Translate and You want it ;-) Trust me.

Language mutation saved in database are fine, but there is recomendetion to generate from database data to neon file and use them from classic files.

about a month ago

Mabar
Member | 145
+
+1
-

You should translate a placeholder string (general.images) and have a translation for it in every language.

Language mutation saved in database are fine, but there is recomendetion to generate from database data to neon file and use them from classic files.

Doesn't it mean container recompilation at runtime? (Not sure how it works in symfony(kdyby)/translation)

Last edited by Mabar (2019-10-18 18:55)

26 days ago

dan_slama
Member | 2
+
0
-

Thank you. I will try to do it this way.