Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / April 2007

Tip: Looking for answers? Try searching our database.

Detecting whether Chinese characters are installed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hugh Robinson - 19 Apr 2007 17:55 GMT
I have a dropdown for language in my application. I use the
CultureInfo.NativeName to display the language in the dropdown list (combo
box)  (CultureInfo is a .NET class)

However, on a US English copy of Windows, if I do not have the East Asian
fonts installed (via Control Panel), then the native name for Chinese is
displayed as a series of square boxes.

What I would like to do is to be able to tell from my .NET code whether or
not I'm going to get square boxes shown in my dropdown list (i.e. the
correct fonts are not installed). If they are not installed, I can easily
write something like "Chinese (font installation required)" in the dropdown
list, which would look much nicer than a series of square boxes.

By the way, I can't simply "make users install the East Asian fonts" - not
everyone reads the manual!!

Thanks
Michael S. Kaplan [MSFT] - 20 Apr 2007 03:44 GMT
You can pinvoke to the IsValidLocale function, using any East Asian LCID
(make sure to use the "installed" flag and not the "supported" flag).

Signature

MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.

>I have a dropdown for language in my application. I use the
>CultureInfo.NativeName to display the language in the dropdown list (combo
[quoted text clipped - 14 lines]
>
> Thanks
Hugh Robinson - 20 Apr 2007 20:02 GMT
Great - that did just what I needed. Thanks for the pointer!

Hugh

> You can pinvoke to the IsValidLocale function, using any East Asian LCID
> (make sure to use the "installed" flag and not the "supported" flag).

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.