Page 3 of 5

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 3:02 pm
by Dan
That's great Marcel! :D I'll wait you to release your program to translate the rest of the text and try again to test it in the game, then!
Do you think you can make it so that special characters such as àèéìòù etcetera could be displayed smoothly by the game?

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 3:27 pm
by Marcel
Hi Dan,

I just tested it in the HEX-Editor. The game crashes as soon as some of your chars are in the text. I changed the o's to à for the first blacksmith text line. As soon as I talked to him it crashed.

I guess it's because they did not map this kind of chars in their font. Or it's just because i messed up the file.
I will recheck it when the XNB issue is gone. Maybe discord has to read UTF-Strings to make it work?!

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 4:03 pm
by TobiasAmaranth
From what I've heard, that's what it is. Only standard English characters can currently be used (because yes, the font is lacking them).

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 4:17 pm
by Marcel
Chinese translation will be a big problem then i guess :P

Edit:
I guess I will reimplement your CSV ContentWriter to read the XNB stuff, that will do the stuff, shouldn't bee that hard. Time for some HEX-Action I guess :)

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 4:26 pm
by poe
Marcel wrote:Awesome translation tool
You should put the translation tool in another thread, we can pin that one since it's useful to people of all languages :).

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 4:29 pm
by Marcel
poe wrote:
Marcel wrote:Awesome translation tool
You should put the translation tool in another thread, we can pin that one since it's useful to people of all languages :).
Good idea :> As soon as the first stable release is finished, I will do it :)

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 8:35 pm
by James
Marcel, your work looks great! I'm really sorry about the XNBs being a pain. I opened them with notepad and saw it was plain text, but didn't test it myself. Didn't realize that it was binary formatted. Let me know if you have any problem getting around it.

Also, the font only contains american english characters a-z, A-Z, 0-9, and a few special ones like $, %, etc. I apologize to everyone, I'm still learning what all is required for this stuff. But, I suppose this is good learning opportunity for full game.

Let me know if you can't work around the .xnb format Marcel, and we'll figure something out. Thanks!

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 8:36 pm
by timdodd
Awesome Job ! This should work perfect. I like the drag and drop feature :D

Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 8:53 pm
by timdodd
Hey Marcel,

If your using .net, I think you can use this method to open the xnb files. I need to test it out , but I'm pretty sure this will work. I'm going to test it later and I will let you know what I find :D

Code: Select all


            public CSVArray OpenDatabase(string file)
{
            FileStream fs = new FileStream(file, FileMode.Open);
            BinaryFormatter formatter = new BinaryFormatter();

            CSVArray data = (CSVArray) formatter.Deserialize(fs);

	return data;
}		
			
			public class CSVData
			{
			   public string Name{get;set;}
			   public float Data1{get;set;}
			   public float Data2{get;set;}
			   public int Data3{get;set;}
			}
			
			public struct CSVArray
			{
			
			   public CSVData [] array;
			}



Re: German Translation/Translation Tool

Posted: Fri Apr 26, 2013 9:41 pm
by Marcel
@ timtodd:

Yeah I am using .Net (was thinking about c++ but .net is a faster solution to me hehe).

Your solution could work, maybe you have to strip the XNB header! And don't forget, I will have to write back the information in XNB format (including the file header) See here:

http://xbox.create.msdn.com/en-us/sample/xnb_format

But if you figure out something let me know!!! I will not be able to look into it tomorrow (saturday).
But I will try to test your code tomorrow if the "man of time" grants me a second :P(about 4am here lol, time to sleep).

@discordgames:
Thanks :) Your XNB files were plain text?! oO This is how it looks for me:
Image

Do you see the XNB header (first line?). The first line also includes the namespace of your ContentTypeReader etc. XNB MetaData. The Tab-Delimiters are gone etc.
Also, the special chars inbetween all the text (the arrows and stuff)? These seem to be integer values (as an example), this sure are meta data. (HEX-Editor will show)

Me and timtodd will try to work around the XNB issue, if it's too hard or time consuming => i know another solution ;D Just concentrate on the game logic :D

I guess it's a pain in the ass to create a fully unicode compatible font sprite hehe. Maybe there's a way to use a fallback font in XNA? As far as I know XNA needs a font sprite, right?
Maybe loading the .png dynamically would be an idea?! So users could replace the fonts for their language?!

Regards,

Marcel