<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
	<kcfgfile name="klatinrc"/>
		<group name="Language">
			<entry name="UserLanguage" type="String">
				<label>The language selected by the user</label>
					<code>
						KConfigBase *globalConf = KGlobal::config();
						globalConf->setGroup("Locale");
						QString m_language = globalConf->readEntry("Language", "en");
						//keep only the first 2 characters
						m_language = m_language.left(2);
						QString filename = locate("data", "klatin/data/vocabs/");
						filename += m_language;
						QDir check(filename);

						if (check.exists() == FALSE) {
							m_language = "en";
						}
						kdDebug()&lt;&lt; m_language &lt;&lt;endl;
					</code>
				<default code="true">m_language</default>
			</entry> 
		</group>
		<group name="Vocabulary"> 
		<entry name="NumOfQuestions" type="Int"> 
			<label>how many questions are asked in one session.</label> 
			<default>10</default> 
		</entry> 
		<entry name="UnlimitedQuestions" type="Int"> 
			<label>whether KLatin should ask unlimited questions.</label> 
			<default>0</default> 
		</entry> 
		<entry name="DefaultFile" type="String"> 
			<label>the default vocabulary file.</label>
			<code>
				QString fileDir = locate("data", "klatin/data/vocabs/");
				fileDir += m_language;
				QDir vocabDirectory(fileDir, "*.kvtml");
				kdDebug()&lt;&lt; m_language &lt;&lt;endl;
				
				QString defaultFile = (fileDir + "/" + vocabDirectory[0]);
				kdDebug()&lt;&lt; defaultFile &lt;&lt;endl;
			</code>
			<default code="true">defaultFile</default>
		</entry> 
		<entry name="LatinToLang" type="Bool"> 
			<label>whether the questions should be Latin to the user's language.</label> 
			<default>true</default>
		</entry> 
		<entry name="LangToLatin" type="Bool"> 
			<label>whether the questions should be the user's language to Latin.</label> 
			<default>false</default>
		</entry>
	</group> 
</kcfg>