1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <kcfg xmlns=
"http://www.kde.org/standards/kcfg/1.0"
3 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance"
4 xsi:
schemaLocation=
"http://www.kde.org/standards/kcfg/1.0
5 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
6 <kcfgfile name=
"klatinrc"/>
7 <group name=
"Language">
8 <entry name=
"UserLanguage" type=
"String">
9 <label>The language selected by the user
</label>
11 KConfigBase *globalConf = KGlobal::config();
12 globalConf-
>setGroup(
"Locale");
13 QString m_language = globalConf-
>readEntry(
"Language",
"en");
14 //keep only the first
2 characters
15 m_language = m_language.left(
2);
16 QString filename = locate(
"data",
"klatin/data/vocabs/");
17 filename += m_language;
20 if (check.exists() == FALSE) {
23 kdDebug()
<< m_language
<<endl;
25 <default code=
"true">m_language
</default>
28 <group name=
"Vocabulary">
29 <entry name=
"NumOfQuestions" type=
"Int">
30 <label>how many questions are asked in one session.
</label>
33 <entry name=
"UnlimitedQuestions" type=
"Int">
34 <label>whether KLatin should ask unlimited questions.
</label>
37 <entry name=
"DefaultFile" type=
"String">
38 <label>the default vocabulary file.
</label>
40 QString fileDir = locate(
"data",
"klatin/data/vocabs/");
41 fileDir += m_language;
42 QDir vocabDirectory(fileDir,
"*.kvtml");
43 kdDebug()
<< m_language
<<endl;
45 QString defaultFile = (fileDir +
"/" + vocabDirectory[
0]);
46 kdDebug()
<< defaultFile
<<endl;
48 <default code=
"true">defaultFile
</default>
50 <entry name=
"LatinToLang" type=
"Bool">
51 <label>whether the questions should be Latin to the user's language.
</label>
52 <default>true
</default>
54 <entry name=
"LangToLatin" type=
"Bool">
55 <label>whether the questions should be the user's language to Latin.
</label>
56 <default>false
</default>