Creating a languagefile

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2004-02-07 19:20

find the example.xml file (if the mod doesn't distribute one then use the dc++ one) open it in notepad. You'll see something like

<?xml version="1.0" encoding="windows-1252"?>
<Language Name="Example Language">
<Strings>
<String Name="Active">Active</String>
<String Name="ActiveSearchString">Active / Search String</String>
.
.
.
</Strings>
</Language>

change the value between the > and the < ie
<String Name="Active">Word for active in your langauge</String>
do this for all the strings, then load the xml file in dc++

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2004-02-07 23:25

it probably means that the mod doesn't support translations correctly, alot of modders never learn how to use makedefs meaning that the language files dont work. What mod is this for anyway?

To create a correct mod that supports language.xml files you edit the strings.h file and have it in the format

STRING_IDENTIFIER, // "String"

the spaces after and before the // are important, as the next step is to run make defs on it

makedefs client/strings.h client/strings.cpp example.xml

which takes your strings.h and creates the string.cpp (yeah you're not meant to edit that yourself) and an example.xml

psf8500
Posts: 23
Joined: 2003-03-04 18:51
Contact:

Post by psf8500 » 2004-02-08 06:33

Twink wrote:alot of modders never learn how to use makedefs
Im one of them :lol:

I just managed to make a new Example.xml but it seems my stringdefs are in a bit of a mess.
I'll try and tidy them up a bit and include a proper Example.xml in the next release :)

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2004-02-08 14:49

actually once you get into just editing stringdefs.h (yeh I think i said the wrong file in my last post) and auto generating stringdefs.cpp and example.xml it makes it easier, editing the two files separately (.h and .cpp) is actually annoying and can introduce all sorts of lovely human errors. I find it alot faster to just edit the one now.

R200
Posts: 25
Joined: 2003-07-03 08:34
Location: Finland

Post by R200 » 2004-03-12 17:00

Oh yesss, this finally solved my problem getting new functions added without screwing up the entire client... :D

Locked