-
Hello, I'm quite new to Ktor and Kotlin in general so please be patient. I wanted to create a little website (mostly for practicing) and make it available in different languages without having to double my work. I thought that using resources for translatable content would be a good idea and found this plugin for using automated internationalization. The thing is, when I try to use a route to define the content of my tag, it doesn't work. Maybe it's just the way I work that is wrong and maybe I'm not at the right place, but if someone could help me with that, it would be appreciated. Briefly what I want to do is defining routes to my translatable content (let's say "/greetings") and use it in my html tag. For instance writing something as Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello Tarassin, Sorry for the late reply. Are you using a particular templating engine for rendering the page? An adhoc way would be to pass the If the engine you're using is extensible, it should also be possible abstract this and instead use a special construct like a tag or something else for translation, something along the lines of what you have in mind ( Let me know if this helps. Cheers. |
Beta Was this translation helpful? Give feedback.
Hello Tarassin,
Sorry for the late reply. Are you using a particular templating engine for rendering the page? An adhoc way would be to pass the
call
as a parameter when rendering (any engine will support some form of template parameter passing) then in your template you could use it to translate your resourcescall.t(R("greeting"))
.If the engine you're using is extensible, it should also be possible abstract this and instead use a special construct like a tag or something else for translation, something along the lines of what you have in mind (
p{ +/greetings}
).Let me know if this helps.
Cheers.