Temporarily exclude all internationalization .resx files in Winforms app - winforms

I am using resx files for internationalization of my Winforms app. For each form I manually set the .Localizable Property to True.
I also have a Strings.resx file that I use for messageboxes etc.
How can I temporarily (!) disable the localization and just use the neutral language?
I would prefer not setting the threadculture to the neutral language.
Thanks

Related

Is it possible to localize a string inside cs file in WPF project using LocBalm method?

In our WPF plugin project we use LocBaml tool to localize UI. But now it is needed to localize a string inside a cs file:
ToolInfo.MenuCaption = "&Toggle console";
I've found some localization topics:
WPF Localization - On-the-fly Language Selection
WPF Application Framework (WAF)
WPF Localization Extension
It seems that for using these 3rd party tools it is needed to remove LocBalm implementation and write a new one.
Is it possible to stay with LocBaml tool and add a translation just for this string in cs file?
If the custom localization is taking place only in codebehind (cs file(s)), there's no reason that I can see for it to not work with LocBaml.
You could always use a hack to use LocBaml for this localized string as well, something like this :
<TextBlock x:Uid="HiddenText" Name="HiddenText" Text="&Toggle console" Visibility="Collapsed" />
And in codebehind :
ToolInfo.MenuCaption = HiddenText.Text;
This is kind of mildly awful, but you should be able to still localize the string with LocBaml this way.
Otherwise, you'll have to string together a separate system yourself - something with resource strings and a resource manager, most likely - or try to get one of the localization platforms to play nice with LocBaml.

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

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. :)

Is there any difference between Resources.resx and Settings.setting in winform and WPF

I am converting a winform application to WPF. I am wondering if the files under properties (Resources.resx, Resources.Designer.cs, Settings.settings etc) can be simply migrated to WPF application.
Yes, the Resources and Settings designers work the same way in a WPF app. The .resx associated with a Form is however not usable.

What controls should I use on a Silverlight website for loading textual content?

I am embarking on development of a Silverlight based website. I am the lone developer and am doing it on my own (ie, not for any company).
Now I want to load a lot of textual content on the website along with animations and rich user interfaces that can be created using Silverlight. The text content may change from time to time and when that happens, I don't want to do a lot of rework. So I m thinking to load the text from a Word/text file into controls and whenever new content arrives/existing content is modified, I just have to append it to the Word/text file.
This way the application itself remains untouched, only the file contents keep changing. Silverlight doesn't support FlowDocument. RichTextBox doesnt have a Load or LoadFile property. So how do I go about this? Should I make use of Frame, Downloader and similar other controls as well? What do you suggest? What would be the best approach to this?
The RichTextBox does have a Xaml property so you could download Xaml files containing the restricted set of textual elements that RichTextBox supports. You could also create a Silverlight editor around which you could create and upload this Xaml text content.
However have you considered whether Silverlight is the right platform to deliver primarily textual content? HTML is pretty good at that and with frameworks such as JQuery you can create quite interactive experiences that work well across browsers.

Resources