<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Sion Dream</title>
	<atom:link href="http://siondream.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://siondream.com/blog</link>
	<description>Games design and programming by David Saltares</description>
	<lastBuildDate>Sat, 05 May 2012 22:05:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Freegemas libgdx by David Saltares</title>
		<link>http://siondream.com/blog/games/freegemas-for-android-and-html5/comment-page-1/#comment-6909</link>
		<dc:creator>David Saltares</dc:creator>
		<pubDate>Sat, 05 May 2012 22:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?page_id=2126#comment-6909</guid>
		<description>Thank YOU for the feedback :-D. Glad the source code was helpful for someone!</description>
		<content:encoded><![CDATA[<p>Thank YOU for the feedback <img src='http://siondream.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> . Glad the source code was helpful for someone!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Internationalization for libgdx projects by biobob</title>
		<link>http://siondream.com/blog/games/internationalization-for-libgdx-projects/comment-page-1/#comment-6896</link>
		<dc:creator>biobob</dc:creator>
		<pubDate>Fri, 04 May 2012 21:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2148#comment-6896</guid>
		<description>Hi David. You&#039;re reinventing the wheel. I don&#039;t say that it is bad thing because your solution can bring something new.

Look at standard i18n implementation included in Java:
&lt;a href=&quot;http://docs.oracle.com/javase/1.4.2/docs/api/java/util/ResourceBundle.html&quot; rel=&quot;nofollow&quot;&gt;ResourceBundle&lt;/a&gt;
&lt;a href=&quot;http://docs.oracle.com/javase/tutorial/i18n/format/messageFormat.html&quot; rel=&quot;nofollow&quot;&gt;MessageFormat&lt;/a&gt;
&lt;a href=&quot;http://sourceforge.net/projects/eclipse-rbe/#screenshots&quot; rel=&quot;nofollow&quot;&gt;Support for Eclipse IDE&lt;/a&gt;

I do Java as my main work for quite long but I&#039;m fairly new to libGDX. Standard i18n can be maybe overkill for simple games. Maybe there&#039;re some problems to run it under all of libGDX backends but it should be possible. Inspire yourself by all handy features of standard i18n (UTF-8, custom file formats, custom loaders, formats, plural forms etc.)</description>
		<content:encoded><![CDATA[<p>Hi David. You&#8217;re reinventing the wheel. I don&#8217;t say that it is bad thing because your solution can bring something new.</p>
<p>Look at standard i18n implementation included in Java:<br />
<a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/ResourceBundle.html" rel="nofollow">ResourceBundle</a><br />
<a href="http://docs.oracle.com/javase/tutorial/i18n/format/messageFormat.html" rel="nofollow">MessageFormat</a><br />
<a href="http://sourceforge.net/projects/eclipse-rbe/#screenshots" rel="nofollow">Support for Eclipse IDE</a></p>
<p>I do Java as my main work for quite long but I&#8217;m fairly new to libGDX. Standard i18n can be maybe overkill for simple games. Maybe there&#8217;re some problems to run it under all of libGDX backends but it should be possible. Inspire yourself by all handy features of standard i18n (UTF-8, custom file formats, custom loaders, formats, plural forms etc.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Freegemas libgdx by feelingtheblanks</title>
		<link>http://siondream.com/blog/games/freegemas-for-android-and-html5/comment-page-1/#comment-6895</link>
		<dc:creator>feelingtheblanks</dc:creator>
		<pubDate>Fri, 04 May 2012 21:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?page_id=2126#comment-6895</guid>
		<description>Thank you a lot man, studying the source codes has been helpful to me ! it goes without saying that game is good :)</description>
		<content:encoded><![CDATA[<p>Thank you a lot man, studying the source codes has been helpful to me ! it goes without saying that game is good <img src='http://siondream.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Internationalization for libgdx projects by David Saltares</title>
		<link>http://siondream.com/blog/games/internationalization-for-libgdx-projects/comment-page-1/#comment-6832</link>
		<dc:creator>David Saltares</dc:creator>
		<pubDate>Thu, 03 May 2012 21:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2148#comment-6832</guid>
		<description>Thanks a lot for your help, that, and doing a little bit of further research I&#039;ve managed to get UTF-8 working with my system. I&#039;ve basically replaced libgdx&#039;s XmlReader for the Java classic DOM.

You can get the new version using the same link :-D. I&#039;m working on multi-line strings now [1]

[1] http://stackoverflow.com/questions/10439274/parse-xml-multi-line-string-in-java</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your help, that, and doing a little bit of further research I&#8217;ve managed to get UTF-8 working with my system. I&#8217;ve basically replaced libgdx&#8217;s XmlReader for the Java classic DOM.</p>
<p>You can get the new version using the same link <img src='http://siondream.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> . I&#8217;m working on multi-line strings now [1]</p>
<p>[1] <a href="http://stackoverflow.com/questions/10439274/parse-xml-multi-line-string-in-java" rel="nofollow">http://stackoverflow.com/questions/10439274/parse-xml-multi-line-string-in-java</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Internationalization for libgdx projects by Peter Silie</title>
		<link>http://siondream.com/blog/games/internationalization-for-libgdx-projects/comment-page-1/#comment-6787</link>
		<dc:creator>Peter Silie</dc:creator>
		<pubDate>Thu, 03 May 2012 14:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2148#comment-6787</guid>
		<description>ok .. I&#039;ve read some tutorials to learn how to parse XML files on android. Obviously it&#039;s possible to use SAX or DOM. 

I&#039;ve replaced your loadLanguage-function with an UTF-8 compatible version and it works fine on my device. 


Maybe the following code isn&#039;t perfect and could be improved ... usually i&#039;m coding in C# or C++ ;-)

&lt;code&gt;
import java.io.InputStream;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

&lt;/code&gt;


&lt;code&gt;
public boolean loadLanguage(String languageName) 
     {    	 
    	 try 
    	 {
    		 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    		 
    		 DocumentBuilder builder = factory.newDocumentBuilder();    		     		     		     		 
    		 
    		 InputStream is = Gdx.files.internal(LANGUAGES_FILE).read();
    		     		 
             Document dom = builder.parse(is);
             Element root = dom.getDocumentElement();
    		 
             NodeList languages = root.getElementsByTagName(&quot;language&quot;);                                              
                      
             // Iterate through every language to fetch the one we&#039;re interested in
             for (int i = 0; i &lt; languages.getLength(); ++i) 
             {
            	 Node languageElement = languages.item(i);            	 
            	 
            	 NamedNodeMap attributeMap = languageElement.getAttributes();
            	 
            	// If it&#039;s the language we&#039;re looking for
            	 if(attributeMap.getNamedItem(&quot;name&quot;).getTextContent().equals(languageName))            		             	             	                                
                 {
                	 // Empty language
                     language.clear();
                                      
                     // Fetch every string for that language
                     NodeList languageElementNodes = languageElement.getChildNodes();                     
                                      
                     for (int j = 0; j &lt; languageElementNodes.getLength(); ++j) 
                     {
                    	 Node stringNode = languageElementNodes.item(j);
                    	 
                    	 if(stringNode.getNodeName().equals(&quot;string&quot;))
                    	 {
                    		 NamedNodeMap attributes = stringNode.getAttributes();
                    		                     		 
                    		 language.put(attributes.getNamedItem(&quot;key&quot;).getTextContent(), (attributes.getNamedItem(&quot;value&quot;).getTextContent()));                    		 
                    	 }                    	 
                     }
                     
                     return true;
                 }
             }                     
         }
    	 catch (Exception e) 
    	 {
    		 System.out.println(&quot;Error loading languages file &quot; + LANGUAGES_FILE + &quot; &quot; + e.getMessage());
         }    	     	
    	 
    	 return false;
     }

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>ok .. I&#8217;ve read some tutorials to learn how to parse XML files on android. Obviously it&#8217;s possible to use SAX or DOM. </p>
<p>I&#8217;ve replaced your loadLanguage-function with an UTF-8 compatible version and it works fine on my device. </p>
<p>Maybe the following code isn&#8217;t perfect and could be improved &#8230; usually i&#8217;m coding in C# or C++ <img src='http://siondream.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><code><br />
import java.io.InputStream;</p>
<p>import javax.xml.parsers.DocumentBuilder;<br />
import javax.xml.parsers.DocumentBuilderFactory;</p>
<p>import org.w3c.dom.Document;<br />
import org.w3c.dom.Element;</p>
<p>import org.w3c.dom.NamedNodeMap;<br />
import org.w3c.dom.Node;<br />
import org.w3c.dom.NodeList;</p>
<p></code></p>
<p><code><br />
public boolean loadLanguage(String languageName)<br />
     {<br />
    	 try<br />
    	 {<br />
    		 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();</p>
<p>    		 DocumentBuilder builder = factory.newDocumentBuilder();    		     		     		     		 </p>
<p>    		 InputStream is = Gdx.files.internal(LANGUAGES_FILE).read();</p>
<p>             Document dom = builder.parse(is);<br />
             Element root = dom.getDocumentElement();</p>
<p>             NodeList languages = root.getElementsByTagName("language");                                              </p>
<p>             // Iterate through every language to fetch the one we're interested in<br />
             for (int i = 0; i &lt; languages.getLength(); ++i)<br />
             {<br />
            	 Node languageElement = languages.item(i);            	 </p>
<p>            	 NamedNodeMap attributeMap = languageElement.getAttributes();</p>
<p>            	// If it&#039;s the language we&#039;re looking for<br />
            	 if(attributeMap.getNamedItem(&quot;name&quot;).getTextContent().equals(languageName))<br />
                 {<br />
                	 // Empty language<br />
                     language.clear();</p>
<p>                     // Fetch every string for that language<br />
                     NodeList languageElementNodes = languageElement.getChildNodes();                     </p>
<p>                     for (int j = 0; j &lt; languageElementNodes.getLength(); ++j)<br />
                     {<br />
                    	 Node stringNode = languageElementNodes.item(j);</p>
<p>                    	 if(stringNode.getNodeName().equals(&quot;string&quot;))<br />
                    	 {<br />
                    		 NamedNodeMap attributes = stringNode.getAttributes();</p>
<p>                    		 language.put(attributes.getNamedItem(&quot;key&quot;).getTextContent(), (attributes.getNamedItem(&quot;value&quot;).getTextContent()));<br />
                    	 }<br />
                     }</p>
<p>                     return true;<br />
                 }<br />
             }<br />
         }<br />
    	 catch (Exception e)<br />
    	 {<br />
    		 System.out.println(&quot;Error loading languages file &quot; + LANGUAGES_FILE + &quot; &quot; + e.getMessage());<br />
         }    	     	</p>
<p>    	 return false;<br />
     }</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Internationalization for libgdx projects by Peter Silie</title>
		<link>http://siondream.com/blog/games/internationalization-for-libgdx-projects/comment-page-1/#comment-6747</link>
		<dc:creator>Peter Silie</dc:creator>
		<pubDate>Thu, 03 May 2012 09:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2148#comment-6747</guid>
		<description>I&#039;m also fairly new to Java. I was looking for a way to localize my libgdx game and your implementation works very good except of the missing UTF-8 support. 

I think the problem is that the libgdx XmlReader class only support 8 bit character encoding. I think it should work with the Java XMLReader class, but I&#039;m not sure how to use it. 

here is an example:

http://stackoverflow.com/questions/3287726/to-read-xml-file-in-utf-8-format-string-using-android</description>
		<content:encoded><![CDATA[<p>I&#8217;m also fairly new to Java. I was looking for a way to localize my libgdx game and your implementation works very good except of the missing UTF-8 support. </p>
<p>I think the problem is that the libgdx XmlReader class only support 8 bit character encoding. I think it should work with the Java XMLReader class, but I&#8217;m not sure how to use it. </p>
<p>here is an example:</p>
<p><a href="http://stackoverflow.com/questions/3287726/to-read-xml-file-in-utf-8-format-string-using-android" rel="nofollow">http://stackoverflow.com/questions/3287726/to-read-xml-file-in-utf-8-format-string-using-android</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Internationalization for libgdx projects by David Saltares</title>
		<link>http://siondream.com/blog/games/internationalization-for-libgdx-projects/comment-page-1/#comment-6716</link>
		<dc:creator>David Saltares</dc:creator>
		<pubDate>Wed, 02 May 2012 19:44:30 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2148#comment-6716</guid>
		<description>I&#039;m fairly new to Java, what would I need to include/modify to add UTF-8 support?

Thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;m fairly new to Java, what would I need to include/modify to add UTF-8 support?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Internationalization for libgdx projects by Peter Silie</title>
		<link>http://siondream.com/blog/games/internationalization-for-libgdx-projects/comment-page-1/#comment-6714</link>
		<dc:creator>Peter Silie</dc:creator>
		<pubDate>Wed, 02 May 2012 14:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2148#comment-6714</guid>
		<description>Unfortunately that implementation does not support UTF-8 :-(</description>
		<content:encoded><![CDATA[<p>Unfortunately that implementation does not support UTF-8 <img src='http://siondream.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Urban Race by David Saltares</title>
		<link>http://siondream.com/blog/games/urban-race/comment-page-1/#comment-6708</link>
		<dc:creator>David Saltares</dc:creator>
		<pubDate>Tue, 01 May 2012 18:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?page_id=2101#comment-6708</guid>
		<description>You will need to install a Subversion client like Tortoise [1] and checkout the project from here [2].

[1] http://tortoisesvn.net
[2] https://urban-race.googlecode.com/svn/trunk</description>
		<content:encoded><![CDATA[<p>You will need to install a Subversion client like Tortoise [1] and checkout the project from here [2].</p>
<p>[1] <a href="http://tortoisesvn.net" rel="nofollow">http://tortoisesvn.net</a><br />
[2] <a href="https://urban-race.googlecode.com/svn/trunk" rel="nofollow">https://urban-race.googlecode.com/svn/trunk</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Urban Race has been freed by Tienda de Videojuegos Online &#124; Picagua.com &#124; Comprar videojuegos de PS3, Xbox 360, Wii, PC, PSP, PS2, DS, 3DS &#124; Todo en Videojuegos</title>
		<link>http://siondream.com/blog/games/urban-race-has-been-freed/comment-page-1/#comment-6705</link>
		<dc:creator>Tienda de Videojuegos Online &#124; Picagua.com &#124; Comprar videojuegos de PS3, Xbox 360, Wii, PC, PSP, PS2, DS, 3DS &#124; Todo en Videojuegos</dc:creator>
		<pubDate>Tue, 01 May 2012 16:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://siondream.com/blog/?p=2156#comment-6705</guid>
		<description>&lt;strong&gt;Tienda de Videojuegos Online &#124; Picagua.com &#124; Comprar videojuegos de PS3, Xbox 360, Wii, PC, PSP, PS2, DS, 3DS &#124; Todo en Videojuegos...&lt;/strong&gt;

[...]Urban Race has been freed &#124; Sion Dream[...]...</description>
		<content:encoded><![CDATA[<p><strong>Tienda de Videojuegos Online | Picagua.com | Comprar videojuegos de PS3, Xbox 360, Wii, PC, PSP, PS2, DS, 3DS | Todo en Videojuegos&#8230;</strong></p>
<p>[...]Urban Race has been freed | Sion Dream[...]&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

