Multi-Language And Resource Files?

Aug 27, 2009

I have a question about creating a multi-language application and the use of resource files. I will explain what I have done and what I would like the final product to be like.I am doing this in VB.Net and using Visual Studio 2008 After creating a new project, I added a resource file to the project (Add -> New Item, Selected Resource File, named it Resource1.resx).

I then double clicked the resource file and was able to add some names and values. For example,

Name - lblFirstName, value - John
Name - lblLastName, value - Smith

On my form, I have 2 labels: FirstName, and LastName

In Code, I added

FirstName.Text = My.Resources.Resource1.lblFirstName
LastName.Text = My.Resources.Resource1.lblLastName

If I run this code, it works fine. John and Smith are displayed on the labels. Now for my question. Say instead of first and last name the labels (buttons, menu items, etc.) were actually words that would be different in different languages. What I would like is to have something like

EnglishText.resx
SpanishText.resx
GermanText.resx

Each resource file would contain the same names, just different values. Depending on what language was selected, decided by the user (from a menu), how can I get the matching resource file to be used.

Basically what I want would be FirstName.Text = My.Resources.<Language Specific Resource File>.lblFirstName

Is something like this possible? Is this an acceptable approach? Is there a better way of doing this? I try to check often to see if there are follow up questions or if more information needs to be provided.

View 1 Replies


ADVERTISEMENT

Include Resource Files For Each Language?

May 31, 2011

i have been looking over the msdn article to translate an application over here http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx this makes sense to include resource files for each language, giving each resource the file naming convention e.g de-DE for german and letting the system pull the correct resource string through based on the regional system settings. I can see how this will work for strings such as message boxes the article states I need a resource file for each language. all variables will be the same accross all resources, I just need to store the translated string against the correct variable.

I have a question about designer contents I have several forms I've used the form designer to set the forms text and controls text.I can see that a form has a language property that you can set and translate the strings from the designer. my understanding is that a resource file will be generated per form per language changing the language property of the form.

my question is can the above msdn article be mixed with forms designer language method? if so, will this be too many resource files?What is the best practice for application translation?

View 10 Replies

Add String Table For Chinese Language In Resource File (*.res In VB6)

Sep 7, 2009

How can we add multiple columns in resource file (.res) for multi language (eg. 1st column for English and 2nd column for Chinese) through script used by rc.exe utility? We know how to add one column to resouce file using script and compile it with rc.exe it will generate one default language column with id,

[Code]...

View 1 Replies

Include Multi Language Support?

Nov 23, 2009

Currently I am doing a CMS and I want to

View 2 Replies

VS 2010 Multi Language Networking App

Dec 4, 2011

I am a Network Administrator in the Army so programming is not my strong area. I have been messing with Batch files and WMI, just recently i started VB Scripts (VERY BASIC) like adding an input box to set computer name, scan network for computer name on domain, return wmi info for that remote computer etc... I know there are programs out there that can do all of this, however the Army will only allow certain approved programs to be installed on government workstations, i have been using .Bat files to gather info which is fine, however it is very time consuming when you have entire subnets with computers, networked printers, etc to place into a spreadhseet for higher headquarters tracking not to mention the over 20 columns of required data to track for each computer. I have VB 2010 Express, working on a Windows Form Application Project. Goal is to interface my VB Script (written with notepad) with a GUI that will generate an internal spreadsheet on the form window in a datagridview. So far i have the basic window and i have my gridview with my column headers set. How do i get the data into the columns and rows accordingly.

Application Basic: Execute Program, in main window select button (Scan IP Range) <--- I want this to open an input box for the beginning subnet, input base address to start scan from, next input box for end range, then msgbox for start scan. i want the results of the scan to autofill the datagridview and add new row for each IP address that had a ping reply, returning valid data from WMI results as it receives the data. What would be the best method to achieve my goal. i am not asking you to write the program, i have been looking and studying MULTIPLE sites, think i just need another set of eyes on this to unlock the knowledge i have locked away, if ya know what i mean. Also, if you don't mind let me know what you think of this app im trying to turn out... Super Thanks for your help.This is the Base Batch File running. It calls an external VB Script written in notepad. (I want this implemented into the app form so there is no console window.)This is the inputbox from external VB Script that is called.This the result of the external VB Script (the info i want to put in the datagridview of the app.)I also, for some reason can't get scroll bars to show in the app when i hit F5, theres about 15 columns passed the MAC column...?

View 1 Replies

Added Multi-language Using The Short Article?

Apr 28, 2009

hen you add for example German language you will have these files: formMain.resx ormMain.de-DE.resx formMain.Designer.vb formMain.vbIn first file you will have resources for neutral language, like strings, images, ..So now you need to add also resources for strings used in code. Add a new resource file and name it formMain.Strings.resx Then i will enter name, value pair for every string that should be translated. When you add resource file then it is automatically typed because another file with name ormMain.Strings.Designer.cs is automatically regenerated on every close of resx designer.Add another resource with name formMain.Strings.de-DE.resx. Add the same Name key's from previous resource, and just change the Value with coresponding german words. Now to access created resource from the source it will be like this

View 2 Replies

Create A .net Windows Application In Multi-language?

Feb 23, 2009

If i want to create a vb.net windows application in multi-language (EnglishArabic). Is there any steps i need to do?I installed the Arabic at my windows XP and I am able to write the labels and the the textbox for example in arabic but is there a way for the controls to shifts automatically?

View 7 Replies

Standard Procedure To Build A Multi Language Application?

Apr 6, 2010

Is there any tool specific to build a multi language application? And in general what is the procedure to be followed when you want to create a multi language application??

View 7 Replies

VS 2008 Multi Language Application - Two Tables In Database

Jul 10, 2009

I'm building a multi language application, but in the application, there will be some data that will be retrieved from the db. In the db I have two tables (Access Groups, Teams) the two tables are related, there are some groups, that have teams, example (sellers can belong to team 1, team 2, team 3...). The data that will change it's the names for the access groups and the names for the teams. The only way that I can think to do this, is to have the different values for all the languages in the code, or some auxiliar file, and when loading the application I'll truncate the two tables and fill them with the current language values. By the way those values never change...

View 5 Replies

[2008] Multi-language - Cannot Get My Application To Display In English

Feb 14, 2009

VS 2008 SP1. I cannot get my application to display in English, it always displays in French. I have an application that uses 2 languages. The default language is en-GB and the second language is French. For setting the text of the buttons and labels. I have set the localized property to true and changing the language to fr-FR on the form. So setting the default languages controls by choosing the default the language property, and then switching to French language to set the French controls. So I have the following files:

formMain.resx
formMain.fr-FR.resx
formMain.Designer.vb
formMain.vb

And for message boxes and other strings I have added these 2 resource files

formMain.Strings.resx
formMain.Strings.fr-FR.resx

So if I want to switch to different languages I have changed the cultureInfo as follows:

If My.Settings.Default.Language = "fr-FR" Then
Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr-FR")
Else
Thread.CurrentThread.CurrentUICulture = New CultureInfo("en-GB")
End If

And for string I use the following: MessageBox.Show(formMain_Strings.SameStringName)

I also an address book form that is a child of the formMain. Which I have used the same method. However, the address book works as normal, but the formMain never changes to the language I want. Even though tested by explictly setting the language to en-GB in the form constuctor before the inializeComponent() it will always default to French. Not sure why the address book (child) work correctly, the parent form (formMain) will always display in French, no matter if I have set this to en-GB. I am 100% that my method is correct using what I have show you above. I was thinkng about deleting the formMain and creating a new one. But that would mean doing everything again and would take too long.

View 2 Replies

C# - Visual Studio 2010 Express Multi-language Solutions?

Dec 1, 2011

I am working on a C# project, which needs a VB.NET Class library.I have added the DLL reference of VB.NET Project into C# project.This works fine, but sometimes I need to debug the VB.NET project or pause the project and check the variable values of my VB.NET Project.Is it possible in Visual Studio 2010 Express Edition?

View 2 Replies

Provide Multi-language Support In My Windows Application Developed?

Jun 3, 2009

I M DEVELOPING AN ASP.NET APPLICATION I WANT TO PROVIDE INTERFACE IN ARABIC AND ENGLISH

View 2 Replies

Change Text Direction / Align In Multi-language Website With Asp.net And Program?

Mar 9, 2009

I use resource files in my web page.

my language in website is English and Farsi(Persian)

BUT I DO'NT KNOW .....

how to change text align or text direction in webpage with ASP.net and VB.Net 2005 ?

View 2 Replies

Localizing Multi-lined String As One Constant In Resource File

Jan 4, 2010

I have a multi-lined string message that needs to be added to the Resources.resx file of the project. Currently I'm achieving this some thing like this MessageBox(My.Resources.MyMsg1 & vbNewLine & My.Resources.MyMsg2 ). This works.However I'd like to have the entire message in one resource string rather than adding two resources strings to the Resources.resx file.I've tried using' but no luck..message displays as "My message.Rest of the message".I've also tried manually adding a new line in the Resources.resx file. ( by doing "My message.<Shift+Enter>Rest of the message" But message is adding an additional space before the message in the second line.

View 8 Replies

Icons From Resource File - Use Files Inside Of Resource File In Apps?

Feb 26, 2011

So i created resource file New --> new file --> Native Resource Template Then added icons with custom id, like "x", "u_100", .. so i understand, what the files (in my case icons) is.. And i saved as 32-bit resource file (*.res) So i have a question, how can i use these files inside of resource file in my apps? i know how to add icons in to my app.. Me.Icon = New Icon(C:/icon.ico)

View 6 Replies

Extract QuickTime Files From A Resource And Convert Them Into Separate Files?

Jun 8, 2009

I have a resource file for a program, and i have determined that the resource file just a big string of files glued together whole, i know that the movies contained in the file are quicktime mov. Where can i find information on the quicktime header? and how can i determine the length of a file once i find it?

View 1 Replies

VS 2005 Make Multi Language Desktop Application In .net 2005?

Nov 6, 2010

how to make a multi language desktop application in vb.net 2005. only a small desktop application in which i can change language according to countries.

View 1 Replies

Running Files From Resource Files?

Jun 11, 2011

That i need to do is running file that i have put in the resource files (exe file)So the idea of this when i click the button the file that i have put run so it cant be happen with shell.

View 4 Replies

Asp.net - Add Two Language Code Files I.e. C# To App_Code?

Feb 28, 2010

While adding two language code files i.e. C# and VB.NET to App_Code, got an error The files ... file names ... use a different language, which is not allowed since they need to be compiled together.Is there a way to add two different language files?

View 1 Replies

Add A Few Resource Files?

Dec 25, 2011

when i add a few resource files and add them in go to debug i get this error

View 9 Replies

Generating Resource Files?

Feb 14, 2012

Generating resource files

View 1 Replies

Localization With Out Resource Files?

Jul 14, 2011

Can't we do localization with out Resource files ?

View 8 Replies

Opening Up Files From The Resource?

Mar 4, 2011

how do i open a .exe file from inside the resource by click a button which will open a .exe file in the resource folder, which will work on any pc. The .exe will be like a installer or something. so basicy Click the button it will launch the installer and this will with on any pc?How do i do this?

View 3 Replies

Read Only Selected Text From Pdf Files - Visual Basic Language?

Jun 20, 2010

how to read selected text from pdf files in vb.net - visual basic language ?

View 1 Replies

Access Resource Files From Code

Apr 15, 2010

If I have added an html file to my vb 2008 form app project - for use with the webbrowser control. What would be the correct syntax for navigatingto it from the webbrowser.navigateto method.

View 11 Replies

Calling Files From Resource Folder

Nov 3, 2009

previously i have coded: Me.PictureBox1.Image = Image.FromFile(Application.StartupPath + "\JPG LandoltC" + filePath + ".jpg") where filePath is the function to locate the name of the pictures but now i have to put everything into the .exe to make it more "sightly" so now i'm trying Me.PictureBox1.Image = My.Resources.filePath and its not working.

View 6 Replies

Customer Editable Resource Files?

Dec 10, 2010

I have an application that uses resource files (.resx) to switch the application between languages.These resource files are compiled at development time to create the dll'sHowever, there are many times when an application gets deployed onsite, and there are spelling mistakes, or general mistakes in the translated text.

View 1 Replies

Edit Any .dll Files's Resource Like Bitmap?

Dec 30, 2009

I want to edit any .dll files's Resource like bitmap, strings and replace it as resource hacker or peexplorer do.

View 4 Replies

Embedded Resource - How To Extract Files

Dec 14, 2009

I want to create a patcher/installer type program. I have 3 files that need to be embedded or stored in a file. Two files need to be extracted when user clicks a button and one of those two files need to be run with a parameter when the button is clicked and last file needs to be extracted when program closes down. All 3 files need to be able to be updated in the program.

View 7 Replies

Generating Resource Files For Form?

Nov 21, 2011

I have a VB project which has a list of forms, one of the Forms resx file doesn't contain information about controls and seems to be corrupted, now I want to regenerate the resource files again for the form, how can I do that?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved