PlatformNotSupportedException and Localization Device

G

Guest

Hi,

We are developping a CF 1.0 application to run on our new platform. This
platform is custom and is based on Windows CE 5.0. We create an english CE
5.0 image to put to our platform and we included diffrents fonts to localize
our application.

We want to localize our CF application without changing the OS. For
example, this is true than i will receive a PlatformNotSupportedException
error if i try to localize my application in Russian? This is true than the
OS do not support Russian and the CF support only the OS languages?

Thank you
 
C

Chris Tacke, eMVP

What do you mean by "support"? If you have the right font installed, and
you use that font with localized string resources, the system doesn't know
or care about it. You won't get localized system dialogs, and you may have
to roll your own input method, but otherwise there's no problem.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
D

Daniel Moth

In theory you should be able to support other languages without the platform
support (assuming you are not using OS components e.g. Msgbox) since
ResourceManager.GetString has an overload that take a CultureInfo object.

In practise, I would only (and do only) support locales that are supported
by the OS.

In case it helps, here is a relevant link with useful links on it:
http://www.danielmoth.com/Blog/2004/11/cultureinfo.html

Cheers
Daniel
 
G

Guest

Hi! I work with Alain on this project.

Here's what I tried:

System.Globalization.CultureInfo ci = new
System.Globalization.CultureInfo("fr-CA"); // French-Canada
System.Resources.ResourceManager res = new
System.Resources.ResourceManager(typeof(StringTable));
// StringTable is the class that has the "resx" files.
string s = res.GetString("Global.ApplicationName", ci);

I still get the "PlatformNotSupportedException"... French-Canada has nothing
special. It uses the latin char set as for English.

If I replace "fr-CA" by "en-US", it works well.
 
D

Daniel Moth

Which line do you get the exception on? I guess when you create the
cultureinfo, right? That will not work. You'll have to create a culture that
exists on the device (and is not already used by something else) and put
your French strings in the satellite assembly for that culture thus fooling
the system.

As I said, in theory it should work, in practise I wouldn't consider
supporting a locale that is not in the OS. The correct way to do it is
described on the link I sent you previously.

Adding the locales to the OS is as simple as checking a box (not including
translating OS bits) so talk to your OEM.

Cheers
Daniel
 
G

Guest

The exception is on the GetString() command. My strings are in a satellite
assembly (as many resx files as there are supported languages, which leads to
as many folder during the deployment), as I already do it in my other
softwares (.Net framework 1.1). In fact, it should work, but it doesn't...

Well, we will try to add the desired languages with the Platform Builder 5
(PF5) and see what happen. Our only concern is that some languages are not
available under PF5 and we must support these languages, like Russian and
Hungarian.

Thank you very much for your support!
 
G

Guest

Hi guys can you please tell me a way to localize the forms as winres dose not
work for .netcf resx files.

thanks,
Siva
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top