Article View: borland.public.cppbuilder.internationalization
Article #763Tool for merging dfn (language) files
From: Oliver Rutsch
Date: Thu, 21 Mar 2002 09:20
Date: Thu, 21 Mar 2002 09:20
59 lines
4101 bytes
4101 bytes
Hi !
I've made a small tool for merging dfn files of different versions.
Let me explain what's the problem with the ITE:
In our company we have to translate our program into four languages. As
I have no idear how to write and speak japanese or french we outsource
this work to someone else. This process will take some time and we
certainly can't stop our work. So our program will be changed in the
visual interface (some actions here, some buttons there) and when we
receive the translated dfn and dfm files they simply doesn't match the
one's I have on my computer.
If I copy now the translated dfn/dfm into my language directory I can
certainly make a resource dll (e.g. .jpn file in japanese) but
unfortunately I can be sure my program will not work any longer as
expected although my source code is O.K. There will be very strange
results like 'Abnormal program termination' and 'Access violations'
which you will never get in your non-translated program. An 'update
resource dlls' will not help in this case since it does NOT update the
old dfn in the right way !
There is no mechanism in the ITE which ensures that the resource dll's
are matching your code, so you have always to hope that it works.
As we have a lot of translations and we can't do the work over and over
again on a 'build from scratch' version I decided to make a tool which
merges the translations of an older dfn in a newer, normally 'build from
scratch' dfn. Maybe you will loose some translations if you have renamed
your components but you can ensure that your program will work !
How it works:
You have to select three files:
1. Your translated dfn file
2. Your untranslated 'build from scratch' dfn file
3. The new created merged version of these two files
Choose the properties of the dfm (like caption, hints, items and so on)
you want to merge.
First the program looks in the translated file if there are translated
entrys and if they differ from the original ('Orig:' <-> 'Curr:').
After that it searches the above entrys in the untranslated file. If it
finds a match, it will exchange the 'Curr:' field with the translated
version.
Finally it will write the new dfn file which you can copy back in your
translations directory. Do a 'update resource dlls' and have a look at
the results. For me it works and hopefully it could help someone with
the same proplem.
So, if there's someone interested in the program and the sources he (or
she) should write me an email and will receive the program, sources and
documentation for free. It should be clear that I'm not responsible
for any defects caused by this program (although it shouldn't destroy
anything - but it's always a good idea to make a backup before working
on the files).
Bye,
--
Dipl. Ing. Oliver Rutsch
EMail: orutsch@sympatec.com � Tel.:+49 5321/563-137
Sympatec GmbH 38644 Goslar � Germany
Technical Details
Message-ID:
<3C99A5EA.80607@sympatec.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!newsfeed.cwix.com!news1.optus.net.au!optus!intgwlon.nntp.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10297d,14c37b02149bfa71,start X-Google-Attributes: gid10297d,public X-Google-ArrivalTime: 2002-03-21 01:28:59 PST Message-ID: <3C99A5EA.80607@sympatec.com> Date: Thu, 21 Mar 2002 09:20:42 +0000 From: Oliver Rutsch <orutsch@sympatec.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; QXW0330b) Gecko/20010726 Netscape6/6.1 X-Accept-Language: de-DE MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internationalization Subject: Tool for merging dfn (language) files Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Organization: Ye 'Ol Disorganized NNTPCache groupie Cache-Post-Path: post.sympatec.net!unknown@rutsch2.tksympatec X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) NNTP-Posting-Host: 217.6.163.138 X-Trace: dnews 1016702442 217.6.163.138 (21 Mar 2002 01:20:42 -0800) Lines: 60 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!newsfeed.cwix.com!news1.optus.net.au!optus!intgwlon.nntp.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews