You are not logged in.
Pages: 1
Hi there,
My first question is what would be the most optimized way to implement a multilingual setup based on mvc-blog example?
My second question is about images, I was just wondering how are you used to handle image(s) in post on your side?
On my side, I have deployed a standalone imgproxy server; An user can then insert in HTML content code a shortcode, for example `{{img="/blurred/image1.jpg" alt="..."}}` (`blurred` is a preset and handled by imgproxy).
Once the article is saved, a new folder is created using article's ID as folder name - eg. `/.static/images/{{ID}}` - and the image is uploaded into this folder - as the image server point to `/.static/images`, he can then handle images variations, cache and serve webp images along some custom presets. Everything works very good and there is not impact, SEO practices at 100%.
Thanks
Offline
About multi-lingual MVC Web, there is no included / automated implementation of i18n yet.
Perhaps the easy way is
- start with a working English (or main language) set of view html files,
- maintain a set of additional per-language view html files, each in its sub-folder,
- re-route the page views at HTTP server level to access the main (English) interface methods,
- use {{"English text}} pattern and OnStringTranslate whenever needed.
About images, you may try to implement it using a custom route at HTTP server level. It is easy to redirect POST requests to a specific method.
Offline
Okay, I'll start experimenting with this workflow.
Regarding images, I wanted to know how others do it, like storing images as a blob or other techniques, but after my post, I think that in my case this would definitely not be the way to go. As for the redirection, perhaps I could use it to trigger an initial request to generate the images before a user even visits the page, and thus save a few ms. I hadn't thought of that.
Thanks for your insight @ab
Offline
I made an experiment to get an i18n implementation working for windows. As it is working and found it helpful, I published it on on github along a vcl and mvc-blog examples (require PUREMORMOT2).
Last edited by flydev (2024-06-22 18:26:16)
Offline
Just pushed an update for people interested to see an example of the mvc app using automatic translation based on the msg reference files. Every user, guest or logged, can set his own language kept in cookie session.
ps: I am not claiming it's the right way of doing it as it seem ugly to create and free a changed language on render.
It can be compiled on lazarus. Anyway, the feature is really cool for an hybrid desktop app.
Last edited by flydev (2024-06-27 19:42:30)
Offline
Pages: 1