It is currently 26 Apr 2024, 12:45
   
Text Size

add arabic language to magic the gathering---dotp2014 pc

Moderator: CCGHQ Admins

add arabic language to magic the gathering---dotp2014 pc

Postby hixos » 09 May 2014, 16:35

hello i would like to know if i can add arabe language to dotp2014
the game do not support this language and a lot of arabe peaple love the concept of the game but they don't userstand the language so any help will be useful :shock:
Last edited by hixos on 10 May 2014, 12:38, edited 1 time in total.
hixos
 
Posts: 3
Joined: 09 May 2014, 00:00
Has thanked: 1 time
Been thanked: 0 time

Re: add arabe language to magic the gathering---dotp2014 pc

Postby RiiakShiNal » 09 May 2014, 19:08

About the only way to add a language that isn't supported by the game is to make a mod to replace one of the existing languages. This has the side effect preventing online play with anyone who doesn't have the mod (for online play all players in a match must have the same exact wads).

To replace a language you have to change entries in all of the TEXT_PERMANENT XML files for the language being replaced as well as changing the LOCALISED_TEXT for that language in all cards. The mod will have to have a relatively high order attribute in the header to ensure it can override all WADs that it replaces TEXT_PERMANENTs or cards in. This also means that any bug fix mods (like my Core Fixes) will need to be integrated into the language mod if you want the bug fixes to be present (otherwise the buggy cards with the changed language will override the bug fixed cards that haven't had the language changed in them). This also means that if you want to change the language for any mod, you will need to either override that mod or incorporate it into your language mod.

If you override a file with a new version then you need to make sure that all strings in that file for the language you are changing have been changed. If you forget to change a string it will show in the original language (same thing if you forget a file). If you delete strings from a TEXT_PERMANENT file then in-game those strings will show up as the string keys in all caps (not pleasant to look at).

Current Language Grid:
TEXT_PERMANENT Index - LOCALISED_TEXT language code - Language
03 - en-US - English
04 - fr-FR - French
05 - es-ES - Spanish
06 - de-DE - German
07 - it-IT - Italian
09 - jp-JA - Japanese
10 - ko-KR - Korean
11 - ru-RU - Russian
12 - pt-BR - Portuguese (Brazil)
15 - zh-CN - Chinese (Simplified)
16 - zh-HK - Chinese (Traditional)

Unfortunately we can't use the empty/unused indexes and just add a language (the game code would likely need to be updated to make use of them and we don't have the source).

So to change English to the Arabe language you would change any string in index 3 in all the TEXT_PERMANENT files and you would change the text in all LOCALISED_TEXT tags for all cards to the new language (LanguageCode values would remain unchanged).
For example this:
Code: Select all
   <Row>
    <Cell ss:StyleID="s62"><Data ss:Type="String">AI_HINT_DECLARE_BLOCKERS</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String"></Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Declare these blockers</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Déclarer ces bloqueurs</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Declarar estos bloqueadores</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Diese Blocker deklarieren</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Dichiara queste creature bloccanti</Data></Cell>
    <Cell ss:Index="9" ss:StyleID="s62"><Data ss:Type="String">このクリーチャーでブロック</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">이 방어자를 지정</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Объявить этих блокирующих</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Declarar estes bloqueadores</Data></Cell>
   </Row>
Would change to this:
Code: Select all
   <Row>
    <Cell ss:StyleID="s62"><Data ss:Type="String">AI_HINT_DECLARE_BLOCKERS</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String"></Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">New Arabe text goes here</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Déclarer ces bloqueurs</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Declarar estos bloqueadores</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Diese Blocker deklarieren</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Dichiara queste creature bloccanti</Data></Cell>
    <Cell ss:Index="9" ss:StyleID="s62"><Data ss:Type="String">このクリーチャーでブロック</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">이 방어자를 지정</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Объявить этих блокирующих</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">Declarar estes bloqueadores</Data></Cell>
   </Row>
And this:
Code: Select all
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Creature spells can’t be cast.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les sorts de créature ne peuvent pas être lancés.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[No pueden lanzarse hechizos de criatura.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Es können keine Kreaturenzauber mehr gewirkt werden.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le magie creatura non possono essere lanciate.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー呪文は唱えられない。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[생물 주문은 발동할 수 없다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Заклинания существ не могут быть разыграны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As mágicas de criatura não podem ser conjuradas.]]></LOCALISED_TEXT>
Would change to this:
Code: Select all
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[New Arabe text would go here.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les sorts de créature ne peuvent pas être lancés.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[No pueden lanzarse hechizos de criatura.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Es können keine Kreaturenzauber mehr gewirkt werden.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le magie creatura non possono essere lanciate.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー呪文は唱えられない。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[생물 주문은 발동할 수 없다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Заклинания существ не могут быть разыграны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As mágicas de criatura não podem ser conjuradas.]]></LOCALISED_TEXT>
Granted, you could do the same with any of the existing languages instead of English, I just used that one as the example.

This is not a project I would recommend trying to attempt alone (get several people who are able and willing to help and split up the work).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: add arabe language to magic the gathering---dotp2014 pc

Postby hixos » 09 May 2014, 23:15

Unfortunately it doesn't work it give something like that ....................... just points not arabe text maybe its something with laguage code
hixos
 
Posts: 3
Joined: 09 May 2014, 00:00
Has thanked: 1 time
Been thanked: 0 time

Re: add arabe language to magic the gathering---dotp2014 pc

Postby thefiremind » 10 May 2014, 00:15

hixos wrote:Unfortunately it doesn't work it give something like that ....................... just points not arabe text maybe its something with laguage code
I remember seeing some specific font files for Japanese and Korean inside the core WAD, so I guess Arabic would need one too.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: add arabe language to magic the gathering---dotp2014 pc

Postby RiiakShiNal » 10 May 2014, 02:52

hixos wrote:Unfortunately it doesn't work it give something like that ....................... just points not arabe text maybe its something with laguage code
This is probably because you are using characters that are not available for the font. Some of the fonts appear to be TDX files so it is possible that some of them can be edited, but if there are lots of special characters you may need to do some real fancy font mapping using the Korean and/or Japanese fonts (which would increase the work load). As such it may be beneficial to try changing one of the other languages instead of English (that already uses special characters) to see if maybe the characters you need are available in those fonts.

thefiremind wrote:I remember seeing some specific font files for Japanese and Korean inside the core WAD, so I guess Arabic would need one too.
I had actually thought he meant Arabe (as the title had indicated) instead of Arabic so I mistook for a language other than Arabic (which I just thought I hadn't heard of). Oh well, my mistake.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: add arabe language to magic the gathering---dotp2014 pc

Postby thefiremind » 10 May 2014, 09:28

RiiakShiNal wrote:I had actually thought he meant Arabe (as the title had indicated) instead of Arabic so I mistook for a language other than Arabic (which I just thought I hadn't heard of). Oh well, my mistake.
My guess was as good as yours... actually, we still don't know for sure who guessed right. :mrgreen:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: add arabe language to magic the gathering---dotp2014 pc

Postby hixos » 10 May 2014, 12:34

sorry for the confusion,its arabic language i said arabe because it has some difference from country to country so arabe for me is all arabic laguages.
i will edit the title.
i can make a font file in arabic but i do not know how to change the language of the game to it
hixos
 
Posts: 3
Joined: 09 May 2014, 00:00
Has thanked: 1 time
Been thanked: 0 time

Re: add arabe language to magic the gathering---dotp2014 pc

Postby RiiakShiNal » 10 May 2014, 18:28

hixos wrote:sorry for the confusion,its arabic language i said arabe because it has some difference from country to country so arabe for me is all arabic laguages.
i will edit the title.
Ahh, I did not know that, just a little bit more knowledge to go forward with.

hixos wrote:i can make a font file in arabic but i do not know how to change the language of the game to it
This is why I said you may need to do some fancy mapping. If you take either the Korean or Japanese fonts and replace the characters in one of them with your Arabic characters then you can create a mapping. For example you could map あ to ا then when you translate the files you would first replace the Japanese localization with Arabic then you run the entire file through a global search and replace, replacing each character (in our example ا) with the character that you mapped with it (in our example あ) so in the file you will see the mapped Japanese characters, but in game using the modified fonts it should show up in Arabic. Note that since DotP does not support Arabic you will need to manage all glyphs manually so if a glyph is different at the beginning than in the middle or at the end you will need a different mapping for each form of the glyph (DotP rendering engine will not handle the different representations automatically).

This is obviously not a very nice system (as any typos will be hard to spot in the files after you do the global replacements), but it may be the only way to put the language in. Also DotP will not automatically handle the left-to-right, right-to-left conversion so that is something else to keep in mind.

You could write a set of mapping macros or a program to handle the mappings (automate the global search and replace operations) to make converting the files back and forth (from readable characters to the mapped characters and vice-versa).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 36 guests


Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 36 guests

Login Form