473,416 Members | 1,558 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,416 software developers and data experts.

Translating using resource files

I have resource files in different languages created by VCS 2005 Express.
I want to use those files to translate reports at runtime.

I have text to be translated as string.

I think I need to search resource file for this string id.
After that I need to return translated string from other resouce file ?

Is this best idea?
Where to find sample code which implements this ?
How to allow application users to add translations at runtime ?

Andrus.
Oct 6 '07 #1
2 3499
JT
On Oct 6, 1:30 pm, "Andrus" <kobrule...@hot.eewrote:
I have resource files in different languages created by VCS 2005 Express.
I want to use those files to translate reports at runtime.

I have text to be translated as string.

I think I need to search resource file for this string id.
After that I need to return translated string from other resouce file ?

Is this best idea?
Where to find sample code which implements this ?
How to allow application users to add translations at runtime ?

Andrus.
Andrus,

I am assuming that you are literally translating from one written
language to another. I am 90% sure that you will not be able to
update a resource file at runtime. My suggestion is that you need to
use the same key for each language file. For instance, in a French
resource file, the key would be 'dog' and the returned value would be
'chien'. The Spanish file would have 'dog' return 'perro'. You could
choose which language you would use for the keys and make that the
default language of the reports. If the default language was chosen,
you would not need to translate.

However, if you want to have the "resource" files be updated at
runtime, you might need to reconsider how this is done. If you don't
want the files stored locally on each user's machine, I would suggest
using a web service to update a database, or local XML files; meaning
local to the web server. However, I think that would mean rewriting
the whole XML file each time a change was made. If you don't mind
that the files are only stored on the user's machine, then you could
create a local database and update that as necessary.

For sample code, I would look in the
microsoft.public.dotnet.framework.webservices and
microsoft.public.dotnet.samples and some offshoot of
microsoft.public.sqlserver.

JT

Oct 6 '07 #2
I am assuming that you are literally translating from one written
language to another.
I'm using Winforms reportviewer in local mode.
I have repor (rdlc) file written in one language.
User can select other language in which he want to see report.
I need to change report label texts to other language at runtime in this
case.
I am 90% sure that you will not be able to
update a resource file at runtime. My suggestion is that you need to
use the same key for each language file. For instance, in a French
resource file, the key would be 'dog' and the returned value would be
'chien'. The Spanish file would have 'dog' return 'perro'. You could
choose which language you would use for the keys and make that the
default language of the reports. If the default language was chosen,
you would not need to translate.
Major issue is that it is not possible to use keys to design reports.
Reports contain strings in certain language.

I want to use string string to find key (property name) in resource file.
How to search or enumerate strings in resource file ?
However, if you want to have the "resource" files be updated at
runtime, you might need to reconsider how this is done. If you don't
want the files stored locally on each user's machine, I would suggest
using a web service to update a database, or local XML files; meaning
local to the web server. However, I think that would mean rewriting
the whole XML file each time a change was made. If you don't mind
that the files are only stored on the user's machine, then you could
create a local database and update that as necessary.
I have resource as separate dll file, changed its member to public.
My application chacks at startuup for changed foreign languages resource
files and loads them dynamically if change is dedected.

My dictionary is large (8000 sentences)

Andrus.
Oct 7 '07 #3

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

Similar topics

2
by: RootShell | last post by:
Dear All Im having some dificulty here: I found a great PHP code by Catalin Mihaila that reads a SRC (Sinclair Spectrum $SCREEN Image Format) and tranforms it into PNG format to show onscreen...
3
by: J.Marsch | last post by:
Hello all: I am trying to build a resource dll that will house icons, and I'm afraid that I'm not having much luck reading it. Can you lend hand (or just point me to a good primer). Here's...
12
by: bj7lewis | last post by:
I am working on a project I want to add a few files as resource to access(copy them to FS and use) at runtime. So far in VS.NET IDE, I Add Files to the project and set its Build Action to...
3
by: Jules | last post by:
i'm working with translators that just want to translate "web pages" and not deal with resource files. i'd like to have a file structure that looks sort of like this: / <- root directory where...
4
by: TCook | last post by:
Hey All, I am building a solution which will have many strings that will need to be localized (i.e. strings for toolbars, strings for different WinForms, strings for messages and error messages,...
2
by: Daniel | last post by:
I am just investigating on .resx and .resource files using asp.net. I am attempting to develop a webpage in Dreamweaver on an asp.net webserver. As i read around the net, using a .resource file...
1
by: Bill Mell | last post by:
I would like to use compiled resource files in my web application that are not related to localization. The idea is to have a dll with resources that can be accessed by the website. I have no...
5
by: Andrus | last post by:
I have database containing translations. I'm creating VS 2005 WinForms application which should use this database to translate menu items to user language. I replaced lines in myform.designer.cs...
2
by: Nathan Sokalski | last post by:
I am attempting to create icons for controls I have created using VB.NET by using the System.Drawing.ToolboxBitmap attribute. I have managed to do this in C# by specifying the path to the *.ico...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.