473,387 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Language detection

Hi there. I need to detect what languages are supported by an application
using the VS automation IDE (for a VS add-in). Unfortunately, I can't seem
to find any clean way of doing this other than searching for all (embedded)
resource files and checking for the appropriate language extension (e.g.,
"MyResource.[<LanguageExtension>].resx"). Does anyone know if there's a
cleaner way of doing this (none that I can find in the automation API so
far) and more importantly, how do you determine what the default language is
(since no language extension is present for default language resource
files). Thanks in advance.
Jun 9 '06 #1
3 4329
Hi Michael,

I think that there is nothing in the extensibility model for the IDE, since
that info belongs to the app, not to the IDE, but some pointers:

- The System.Resource namespace has classes and attributes related to this
stuff, such as the ResourceManager, the NeutralResourcesLanguageAtributte,
etc. For example, given a compiled assembly, you can get its
NeutralResourcesLanguage atributte through reflection.

- The localization for forms (Localizable and Language properties) is done
through and extender provider:
System.ComponentModel.Design.LocalizationExtenderP rovider.

- The default language can be retrieved through the
NeutralResourcesLanguageAtributte and if none exists, then
CultureInfo.InvariantCulture().

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

"Michael Brown" <no_spam@_nospam.com> escribió en el mensaje
news:eU**************@TK2MSFTNGP04.phx.gbl...
Hi there. I need to detect what languages are supported by an application
using the VS automation IDE (for a VS add-in). Unfortunately, I can't seem
to find any clean way of doing this other than searching for all
(embedded) resource files and checking for the appropriate language
extension (e.g., "MyResource.[<LanguageExtension>].resx"). Does anyone
know if there's a cleaner way of doing this (none that I can find in the
automation API so far) and more importantly, how do you determine what the
default language is (since no language extension is present for default
language resource files). Thanks in advance.

Jun 12 '06 #2
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi Michael,

I think that there is nothing in the extensibility model for the IDE,
since that info belongs to the app, not to the IDE, but some pointers:

- The System.Resource namespace has classes and attributes related to this
stuff, such as the ResourceManager, the NeutralResourcesLanguageAtributte,
etc. For example, given a compiled assembly, you can get its
NeutralResourcesLanguage atributte through reflection.

- The localization for forms (Localizable and Language properties) is done
through and extender provider:
System.ComponentModel.Design.LocalizationExtenderP rovider.

- The default language can be retrieved through the
NeutralResourcesLanguageAtributte and if none exists, then
CultureInfo.InvariantCulture().


Thanks for the feedback (appreciated). I'll look into these classes but can
you confirm that inspecting the resource file names is the correct (only)
way to detect which languages are supported (at build time anyway). Thanks.
Jun 12 '06 #3
Hi,
can you confirm that inspecting the resource file names is the correct
(only) way to detect which languages are supported (at build time anyway).
Thanks.


I don´t know if it is the correct or only way, but it is a valid one. I
would use it.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


Jun 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: root-boy | last post by:
Okay, this trick could be seen on GOOGLE, if your system's default language is not English. If it is, for example, Russian, GOOGLE automaticaly recognizes it and loads all the links and the such...
1
by: Mevlut | last post by:
Is it possible to detect browser/system language with: Server.CreateObject("MSWC.BrowserType") ? ~
60
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm ...
19
by: Christian Engström | last post by:
If you have a function that returns something by value, the gcc compiler (version 3.2.3 on Windows XP with MinGW) converts the returned value from the type you specify in the code, to the const...
8
by: R. Smits | last post by:
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Languageâ€, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
0
by: darrenhello | last post by:
hi there, I am doing my last year's project and I have a 'little' problem. I have to do an edge detection filter. for now, some normal edge detection filters that I used worked fine but there a...
0
by: origami.takarana | last post by:
Intrusion Detection Strategies ----------------------------------- Until now, we’ve primarily discussed monitoring in how it relates to intrusion detection, but there’s more to an overall...
10
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.