Changing Windows locale programmatically without restarting the application - localization

The WPF application I am working on supports multiple languages. It displays translated text according to the Windows locale. So if Windows is set to German the application will display German text.
I would like to have a single suite of tests to check for localization issues. I don't want to run the same suite of tests for each language. Its a lot of unnecessary repetitive work. To make it work I need an ability to switch to a different language dynamically without restarting the application. I will also need WPF resources to be reloaded dynamically.
Is there a way to do this?

Related

How to use vitejs app and ant desing ui framework without poluting global styles

With assumption I cannot simply get rid off antd (but definitely going to at first opportunity) is there any way how to keep antd from polluting global css with as little code modifications as possible or with code modifications which could be done with any mass code edit tool (search and replace, rollup plugin)?
As you could have guessed if you follow official guide on how to use antd you will pollute your global styles which becomes problem when you have routes in your app each using different ui framework like having /admin route or something similar and whenever you navigate from non-admin to admin route the admin app will load with polluted global styles.
There are many people with this exact problem, multiple issues, multiple proposed solutions which all have any combination of: not working, uses webpack (vite uses rollup), written in Chinese, links to dead repo, or requires you to modify basically every file you have.
I don't think you could link me to any existing google search hit I don't know about so I would really like to get an answer from someone who has this solved in some reasonable way with up to date dependencies and so on.

Localisation issue

I have set up an MVC4 environment where I have created some localisation using simple resx files in the resources directory. The naming of the file I have used was XXXXX.resx and XXXXX.nl.resx.
This worked brilliantly. I have now changed to a (brilliant) third party application (resxmanager.com) since I expect to use a lot of different languages. This application however, uses the "xx-XX" convention for creating the various language files.
So far, so good. I am able to manage the resource files without any problem. The issue is however, that my application doesn't use the correct resource files. The culture and uiculture indicate that the browser is working in the right (i.e. nl-NL) culture but the proper resources are not selected. I have tried various settings in the web.config ([ui]culture="auto", [ui]culture="xx-XX", [ui]culture="xx" etc) but I'm stuck on what to do next.
Is anyone able to put me into the right direction?

Check browser version using Dart rather than JS?

Is there an "Angular/Dart" way to detect older unsupported browsers and prevent to continue with an elegant message (there are plenty of examples using javascript) rather than continue and show a weird layout with code that doesn't work?
Even the angulardart.org/demo site should do this IMO to stop IE8 (I know, but some enterprise customers still have those old browsers installed - and set as default - for legacy apps) from showing content that doesn't even work.
If Dart code cannot be executed the test has to be done in Js. I'm not aware of a library that makes this test.
The test should follow What browsers do you support as JavaScript compilation targets?.

smartgwt offline-caching with no GWT module

I'm using Eclipse 4.2, appengine-java-sdk-1.8.9, gwt-2.5.1, smartgwt-4.0p
I'm trying make the simple project like this - http://uptick.com.au/content/create-gwt-project
but offline.
When I save page (as html page) it doesn't work offline and I receive alert - "GWT module may need to be (re)compiled".
My question is: how to change project to save it as html page (plus project_name_nocache.js file).
Thanks.
You might be getting this error message because you might be trying to run/debug your application in compiled mode. In order to do so, you need to re-compile your application for GWT after every single change in code.
To avoid this, you should run/debug your application in developer mode.
See this link, to have idea on how to run GWT application in dev mode.

Using XDK, how do I link to another page? Hyperlinks are disabled

Edit: so apparently adding class="button" make it work... Can someone provide a reference on what other classes are there? We can't find any information on this.. Thanks
We are making an app in HTML5 using XDK, it has quite a few different views. We were planning to just link to another html page each time we want to go to a different view. But we quickly found out that hyperlinking does not work, is disabled, and button does not link either.
One of the people in my group said she saw an example about having a bunch of and then just show and hide them and use that as UI navigation... is that the only way?
Thanks in advance!
The Intel XDK doesn't insert any class definitions or require that you use a specific framework. It is a tool for assembling an HTML5 hybrid mobile app using the CSS, HTML and JS files that you supply.
If you look at the samples and the default "blank" project that is created when you create a new project you'll see that there may be references to one or more of the following "phantom" JS files:
intelxdk.js
cordova.js
xhr.js
The first two (intelxdk.js and cordova.js) are special "device API" JavaScript libraries. You won't actually find them in your project directory, they are automatically included when you use the emulator and when you build your project (which "wraps up" your HTML5 code and assets into a native wrapper that is specific to the target you are building -- it does not compile anything, it just converts it into a hybrid native/HTML5 container app that can be installed on the target platform that you built for).
The third one is a special helper JS library for dealing with CORS issues from within your app.
None of these three JS files define any classes or HTML tags, etc. They simply implement target-specific device APIs that consist of JavaScript on the "top end" and native code on the "bottom end." Your application only sees and interacts with the JavaScript interface, and only with the APIs that you need to use (which is totally optional).
For an intro to all of this, please see the Intel XDK Documentation page.
So, that means you determine which frameworks and structure your app takes. In other words, if you want to use Bootstrap and jQuery you can do so. If you decide to use the App Designer or the App Starter tools, they will define some classes that impact your layout. However, you are not required to use these tools to define your HTML and CSS, you can do it by hand or use your favorite UI framework library.
Keep in mind that your code is not being rendered by a desktop browser but the embedded "webview" that is part of the device. These webviews don't have the same memory and CPU resources that you're used to working with in a desktop browser, so you need to learn to be "lean and mean" for the best results. You are using HTML5 technologies to build a mobile app -- not creating a web site on a phone.
Hope this helps, please see our HTML5 web site for more background material. It's a little slim right now, but we're adding examples and background material as time and resources permit.
Hope that helps...

Resources