Click here to Skip to main content
15,867,945 members
Home / Discussions / C#
   

C#

 
QuestionFalse positive executable ... Pin
amx_tiger24-May-12 10:14
amx_tiger24-May-12 10:14 
AnswerRe: False positive executable ... Pin
Ravi Bhavnani24-May-12 11:29
professionalRavi Bhavnani24-May-12 11:29 
GeneralRe: False positive executable ... Pin
amx_tiger25-May-12 2:52
amx_tiger25-May-12 2:52 
GeneralRe: False positive executable ... Pin
Ravi Bhavnani25-May-12 3:54
professionalRavi Bhavnani25-May-12 3:54 
GeneralRe: False positive executable ... Pin
amx_tiger25-May-12 9:23
amx_tiger25-May-12 9:23 
AnswerRe: False positive executable ... Pin
Ron Beyer24-May-12 17:11
professionalRon Beyer24-May-12 17:11 
GeneralRe: False positive executable ... Pin
amx_tiger25-May-12 3:02
amx_tiger25-May-12 3:02 
QuestionC#/WinForms and Localization via Satellite Assemblies Pin
Matt U.24-May-12 9:25
Matt U.24-May-12 9:25 
Hello, CP. Lately I encountered a few articles here which discuss the topic of localization via Satellite Assemblies. While I understand the concept, and I have successfully implemented it in a small test project, I have a question. How do you go about localizing an application on a larger scale? For example, an application with many menus/sub-menus, dialogs, MDI children, etc. Is it necessary to create a method (or methods) which make statements such as:

C#
private void SetUILanguage(string culture)
{
    // Load the resources based on the specified culture (e.g. "en-US")

    menuItem1.Text = resManager.GetString("menuItem1Text");
    menuItem2.Text = resManager.GetString("menuItem2Text");
    menuItem3.Text = resManager.GetString("menuItem3Text");

    button1.Text = resManager.GetString("button1Text");

    // Etc., etc.
}


Or is there a simpler way to go about it that I am missing? I was thinking about possibly writing a method for a menu, which would iterate all menus/sub-menus (recursively) and load the resource string, also using the Tag property, like this (example):

C#
// Set menuItem1.Tag to something like "menuItem1"

private void SetMenuItemText(MenuItem item)
{
    // Load the resources based on the specified culture

    // Results in "menuItem1Text"
    string stringName = string.Format("{0}Text", (string)item.Tag);
    menuItem1.Text = resManager.getString(stringName);
}


However, would it be efficient/feasible to set the Tag property for every UI element and set the text this way?

Also, what is the best way to go about designing a UI (a data entry screen, for example) with localization in mind? Are there any resources online for that? I ask because a word in one supported language may be 7 characters long, while the same word in another supported language may be 13 or 14 characters long. How do you design the layout in order to compensate for that?

I came across this article on MSDN for the last question.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.


modified 24-May-12 15:32pm.

Questionlive volleyball score keeping Pin
Member 868621924-May-12 8:04
Member 868621924-May-12 8:04 
AnswerRe: live volleyball score keeping Pin
dexterama24-May-12 11:25
professionaldexterama24-May-12 11:25 
Questiondatetime Pin
Member 886489824-May-12 3:13
Member 886489824-May-12 3:13 
AnswerRe: datetime Pin
Not Active24-May-12 3:42
mentorNot Active24-May-12 3:42 
AnswerRe: datetime Pin
RobCroll24-May-12 15:55
RobCroll24-May-12 15:55 
GeneralRe: datetime Pin
jschell25-May-12 9:00
jschell25-May-12 9:00 
GeneralRe: datetime Pin
RobCroll25-May-12 16:50
RobCroll25-May-12 16:50 
GeneralRe: datetime Pin
jschell26-May-12 7:07
jschell26-May-12 7:07 
GeneralRe: datetime Pin
RobCroll26-May-12 16:18
RobCroll26-May-12 16:18 
QuestionEmgu CV, problem with wrapper for OpenCV Pin
Sissi198724-May-12 0:58
Sissi198724-May-12 0:58 
AnswerRe: Emgu CV, problem with wrapper for OpenCV Pin
Richard MacCutchan24-May-12 3:13
mveRichard MacCutchan24-May-12 3:13 
AnswerRe: Emgu CV, problem with wrapper for OpenCV Pin
Sissi198724-May-12 4:48
Sissi198724-May-12 4:48 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Mycroft Holmes24-May-12 12:32
professionalMycroft Holmes24-May-12 12:32 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Sissi198725-May-12 4:39
Sissi198725-May-12 4:39 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Richard MacCutchan24-May-12 22:25
mveRichard MacCutchan24-May-12 22:25 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Sissi198725-May-12 4:37
Sissi198725-May-12 4:37 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Richard MacCutchan25-May-12 4:54
mveRichard MacCutchan25-May-12 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.