diff options
Diffstat (limited to 'klatin/klatin/klatin.kcfg')
-rw-r--r-- | klatin/klatin/klatin.kcfg | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/klatin/klatin/klatin.kcfg b/klatin/klatin/klatin.kcfg new file mode 100644 index 00000000..407f47a2 --- /dev/null +++ b/klatin/klatin/klatin.kcfg @@ -0,0 +1,59 @@ +<?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()<< m_language <<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()<< m_language <<endl; + + QString defaultFile = (fileDir + "/" + vocabDirectory[0]); + kdDebug()<< defaultFile <<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>
\ No newline at end of file |