Multilingual support for images in .Net

I have a desktop app using .net. I want it to support multilingualism. I can do this using resources. The problem is, what should I do for images with text? Should I include all images for individual languages? If so, it will make it harder and larger.

I just read that there are "9 patch images" in Android, isn't there something like that?

I want to add a background image and write text on top of that. This background image should automatically resize the image without changing the image quality to the size of the text in that language.

+3


source to share


2 answers


I couldn't think of a way to avoid individual images with WinForms. WPF, no problem. Web application, no problem. I've been playing around with text and image on the Button, but this doesn't scale completely. I tried to use a label above the PIctureBox, but it is not possible to achieve transparency with the Label control. I've also tried this with a WebBrowser control - this kind of work might work, but will require further research and might change your deployment dramatically (since you need to make localization available from some http server).



So, I think there is no easy way to do this - I couldn't find anything easier than maintaining images separately.

+1


source


In one of my projects, I had text displayed over images. Since the site was multilingual, so the text was not part of the images. Instead, text was rendered on top of images using css properties for absolute position. This should have been tested in all browsers with multiple languages, as the text size varies in each language, this could break the user experience. so enough space for text considering all supported languages



0


source







All Articles