Click here to Skip to main content
15,898,984 members
Home / Discussions / C#
   

C#

 
Questiongeometry combine Error Pin
mukesh methaniya25-May-12 0:41
mukesh methaniya25-May-12 0:41 
AnswerRe: geometry combine Error Pin
Richard MacCutchan25-May-12 1:07
mveRichard MacCutchan25-May-12 1:07 
QuestionResize Button according to windows form size Pin
sankar456724-May-12 21:51
sankar456724-May-12 21:51 
AnswerRe: Resize Button according to windows form size Pin
Cracked-Down24-May-12 22:07
Cracked-Down24-May-12 22:07 
Questiontake text data frome web Pin
sina rahimzadeh24-May-12 20:45
sina rahimzadeh24-May-12 20:45 
AnswerRe: take text data frome web Pin
Eddy Vluggen24-May-12 21:52
professionalEddy Vluggen24-May-12 21:52 
AnswerRe: take text data frome web Pin
AmitGajjar27-May-12 22:12
professionalAmitGajjar27-May-12 22:12 
QuestionComparing Times Pin
AmbiguousName24-May-12 19:57
AmbiguousName24-May-12 19:57 
AnswerRe: Comparing Times Pin
OriginalGriff24-May-12 20:33
mveOriginalGriff24-May-12 20:33 
GeneralRe: Comparing Times Pin
AmitGajjar27-May-12 22:18
professionalAmitGajjar27-May-12 22:18 
AnswerRe: Comparing Times Pin
Apocalypse Now24-May-12 20:53
Apocalypse Now24-May-12 20:53 
AnswerRe: Comparing Times Pin
AmitGajjar27-May-12 22:16
professionalAmitGajjar27-May-12 22:16 
QuestionCreating a table with the help Asp control at run time Pin
Naughty Ankur24-May-12 19:03
Naughty Ankur24-May-12 19:03 
AnswerRe: Creating a table with the help Asp control at run time Pin
Mycroft Holmes24-May-12 19:33
professionalMycroft Holmes24-May-12 19:33 
QuestionHow to convert document to flash (swf) Pin
quocviet_dhspkt24-May-12 15:32
quocviet_dhspkt24-May-12 15:32 
AnswerRe: How to convert document to flash (swf) Pin
sina rahimzadeh25-May-12 0:03
sina rahimzadeh25-May-12 0:03 
AnswerRe: How to convert document to flash (swf) Pin
wikizhao25-May-12 15:40
wikizhao25-May-12 15:40 
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.

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.