Localize image in windows phone 7 - silverlight

I am developing a windows phone application. Here we use localization in our app. We currently supporting 2 languages in our app. Texts are changed to the selected language by using resource files. But I need to change some images that showing in my app based on the language. Now I am doing it by checking the phone culture pragmatically and change the image path. Is it possible to localize image files too as the same way we localize the strings ?. If it possible how can I do that? .
I googled it, but didn't got any information about localizing images in an application in windows phone.

You can place the uri for your image to a resource file just like you do with strings (different uri in different resource file for different language) and use it with binding.

Related

Multiple language support in windows phone

I'm developing windows phone 8 application which supports two language, English and Spanish.
In my application I have one XAML page which contains WebBrowser control. The problem is when I change phone language to Spanish then all text is displayed in Spanish except the content of WebBrowsercontrol.
The WebBrowser control uses the localization settings for the browser, as set by the user. It can be different from the application localization.
Also, once changed, make sure you don't have any cookies persisting the language selection.

WIn Forms loading labels from resx file

I'm creating a windows forms application. I have all of my resource strings (resx files) in its own project within the solution. Is it possible to reference those resource files at design time?
Coming from web (ASP.Net MVC) we were able to add a reference in the view to the resource file(s) we needed. Am I able to do something similar and set the labels at design time?
Not unless you are prepared to go down the route of using Localizable forms - see WinForms strings in resource files, wired up in designer

Is it possible to install different fonts on windows phone 7 emulator?

I made a demo application using Silverlight where I have given certain Unicode of Hindi language to be displayed on a textbox as a text. ऋ ऊ उ ई इ आ, unicode positions are '\u090B', '\u090A', '\u0909', '\u0908', '\u0907','\u0906' respectively.
So when I pass this whole thing as a string to the textbox.text property it shows at the debug time as the exact value is to the textbox but when I go through the emulator the display shows empty boxes.
Is this require installation of different fonts on emulator? If so then how can I do this? Is it possible to build an application for Windows Phone 7 which can support different languages?
You can embed fonts in your WP7 applications in the same way that you embed fonts for any Silverlight application as decribed in the Embedding fonts in Silvelright blog post by Paul Yanez. You simply check the Embed checkbox in the Text pane in Expression Blend.
NOTE: You will need to make sure that you are licensed to use the font in this way or that it is free for use in this way.

File loader in wpf

Is there any file loader control in WPF which allows importing files during the runtime?
(choosing any file from the file system).
Are you looking for something like the OpenFileDialog? If so, there are examples of how to use it here or here or you can google "wpf openfiledialog" and find many others.
The Windows Forms OpenFileDialog controls are still available for WPF apps:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/aa21c4b6-aa44-44e0-82c9-6e29d9e3c2e3/
I have mostly seen apps using the win forms dialog or an updated win forms one. For example:
http://gong-shell.sourceforge.net/
As a side note, the silverlight file upload picker for SharePoint 2010 looks pretty good it would be good if MS released that to the wild. :)

Show pdf inside silverlight application. PDF to XAML

I need to create silverlight application where customer will see some pdf files.
PDF files have to be inside silverlight control and not rendered as images (customer wants to select text)
For this purposes i need some free libriaries or code to convert pdf file to xaml (or just open pdf so i can convert it to xaml).
Which library can read pdf and help me to convert data to xaml?
Can I read somehow pdf file and write custom convertation tool?
I saw iTextSharp. Is this library can read pdf and help me with my issue?
I will be thankfull for any ideas or links.
I make use of the Acrobat Reader plugin to do the displaying for me. It does require a different method depending on whether your application is running inside or outside the browser (I check if the application is running inside the browser and change the means of display accordingly). If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/9781430272076/.
Hope this helps...
Chris

Resources