Doxygen
Loading...
Searching...
No Matches
language.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 *
4 *
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17
18#include "types.h"
19#include "message.h"
20#include "config.h"
21#include "util.h"
22#include "language.h"
23#include "translator.h"
24#include "translator_en.h"
25#include "translator_adapter.h"
26#include "translator_nl.h"
27#include "translator_am.h"
28#include "translator_sv.h"
29#include "translator_cz.h"
30#include "translator_fr.h"
31#include "translator_id.h"
32#include "translator_it.h"
33#include "translator_de.h"
34#include "translator_jp.h"
35#include "translator_je.h"
36#include "translator_es.h"
37#include "translator_eo.h"
38#include "translator_fi.h"
39#include "translator_ru.h"
40#include "translator_hr.h"
41#include "translator_pl.h"
42#include "translator_pt.h"
43#include "translator_hi.h"
44#include "translator_hu.h"
45#include "translator_ke.h"
46#include "translator_kr.h"
47#include "translator_ro.h"
48#include "translator_si.h"
49#include "translator_cn.h"
50#include "translator_tw.h"
51#include "translator_no.h"
52#include "translator_br.h"
53#include "translator_dk.h"
54#include "translator_sk.h"
55#include "translator_ua.h"
56#include "translator_gr.h"
57#include "translator_sr.h"
58#include "translator_ca.h"
59#include "translator_lt.h"
60#include "translator_lv.h"
61#include "translator_za.h"
62#include "translator_ar.h"
63#include "translator_fa.h"
64#include "translator_mk.h"
65#include "translator_sc.h"
66#include "translator_vi.h"
67#include "translator_tr.h"
68#include "translator_bg.h"
69#include "configimpl.h"
70
72
73void setTranslator(OUTPUT_LANGUAGE_t langName)
74{
75 switch (langName)
76 {
77 case OUTPUT_LANGUAGE_t::English: theTranslator = new TranslatorEnglish; break;
78 case OUTPUT_LANGUAGE_t::Afrikaans: theTranslator = new TranslatorAfrikaans; break;
79 case OUTPUT_LANGUAGE_t::Arabic: theTranslator = new TranslatorArabic; break;
80 case OUTPUT_LANGUAGE_t::Armenian: theTranslator = new TranslatorArmenian; break;
81 case OUTPUT_LANGUAGE_t::Brazilian: theTranslator = new TranslatorBrazilian; break;
82 case OUTPUT_LANGUAGE_t::Bulgarian: theTranslator = new TranslatorBulgarian; break;
83 case OUTPUT_LANGUAGE_t::Catalan: theTranslator = new TranslatorCatalan; break;
84 case OUTPUT_LANGUAGE_t::Chinese: theTranslator = new TranslatorChinese; break;
85 case OUTPUT_LANGUAGE_t::Chinese_Traditional: theTranslator = new TranslatorChinesetraditional; break;
86 case OUTPUT_LANGUAGE_t::Croatian: theTranslator = new TranslatorCroatian; break;
87 case OUTPUT_LANGUAGE_t::Czech: theTranslator = new TranslatorCzech; break;
88 case OUTPUT_LANGUAGE_t::Danish: theTranslator = new TranslatorDanish; break;
89 case OUTPUT_LANGUAGE_t::Dutch: theTranslator = new TranslatorDutch; break;
90 case OUTPUT_LANGUAGE_t::Esperanto: theTranslator = new TranslatorEsperanto; break;
91 case OUTPUT_LANGUAGE_t::Farsi: theTranslator = new TranslatorPersian; break;
92 case OUTPUT_LANGUAGE_t::Finnish: theTranslator = new TranslatorFinnish; break;
93 case OUTPUT_LANGUAGE_t::French: theTranslator = new TranslatorFrench; break;
94 case OUTPUT_LANGUAGE_t::German: theTranslator = new TranslatorGerman; break;
95 case OUTPUT_LANGUAGE_t::Greek: theTranslator = new TranslatorGreek; break;
96 case OUTPUT_LANGUAGE_t::Hindi: theTranslator = new TranslatorHindi; break;
97 case OUTPUT_LANGUAGE_t::Hungarian: theTranslator = new TranslatorHungarian; break;
98 case OUTPUT_LANGUAGE_t::Indonesian: theTranslator = new TranslatorIndonesian; break;
99 case OUTPUT_LANGUAGE_t::Italian: theTranslator = new TranslatorItalian; break;
100 case OUTPUT_LANGUAGE_t::Japanese: theTranslator = new TranslatorJapanese; break;
101 case OUTPUT_LANGUAGE_t::Japanese_en: theTranslator = new TranslatorJapaneseEn; break;
102 case OUTPUT_LANGUAGE_t::Korean: theTranslator = new TranslatorKorean; break;
103 case OUTPUT_LANGUAGE_t::Korean_en: theTranslator = new TranslatorKoreanEn; break;
104 case OUTPUT_LANGUAGE_t::Latvian: theTranslator = new TranslatorLatvian; break;
105 case OUTPUT_LANGUAGE_t::Lithuanian: theTranslator = new TranslatorLithuanian; break;
106 case OUTPUT_LANGUAGE_t::Macedonian: theTranslator = new TranslatorMacedonian; break;
107 case OUTPUT_LANGUAGE_t::Norwegian: theTranslator = new TranslatorNorwegian; break;
108 case OUTPUT_LANGUAGE_t::Persian: theTranslator = new TranslatorPersian; break;
109 case OUTPUT_LANGUAGE_t::Polish: theTranslator = new TranslatorPolish; break;
110 case OUTPUT_LANGUAGE_t::Portuguese: theTranslator = new TranslatorPortuguese; break;
111 case OUTPUT_LANGUAGE_t::Romanian: theTranslator = new TranslatorRomanian; break;
112 case OUTPUT_LANGUAGE_t::Russian: theTranslator = new TranslatorRussian; break;
113 case OUTPUT_LANGUAGE_t::Serbian: theTranslator = new TranslatorSerbian; break;
114 case OUTPUT_LANGUAGE_t::Serbian_Cyrillic: theTranslator = new TranslatorSerbianCyrillic; break;
115 case OUTPUT_LANGUAGE_t::Slovak: theTranslator = new TranslatorSlovak; break;
116 case OUTPUT_LANGUAGE_t::Slovene: theTranslator = new TranslatorSlovene; break;
117 case OUTPUT_LANGUAGE_t::Spanish: theTranslator = new TranslatorSpanish; break;
118 case OUTPUT_LANGUAGE_t::Swedish: theTranslator = new TranslatorSwedish; break;
119 case OUTPUT_LANGUAGE_t::Turkish: theTranslator = new TranslatorTurkish; break;
120 case OUTPUT_LANGUAGE_t::Ukrainian: theTranslator = new TranslatorUkrainian; break;
121 case OUTPUT_LANGUAGE_t::Vietnamese: theTranslator = new TranslatorVietnamese; break;
122 }
123
124 QCString msg = theTranslator->updateNeededMessage();
125 if (!msg.isEmpty()) ConfigImpl::config_warn("%s", qPrint(msg));
126}
static void config_warn(const char *fmt,...)
Definition configimpl.l:78
This is an alternative implementation of QCString.
Definition qcstring.h:101
Abstract base class for all translatable text fragments.
Definition translator.h:29
Translator * theTranslator
Definition language.cpp:71
void setTranslator(OUTPUT_LANGUAGE_t langName)
Definition language.cpp:73
void msg(const char *fmt,...)
Definition message.cpp:98
const char * qPrint(const char *s)
Definition qcstring.h:672
Danish translation.
This file contains a number of basic enums and types.
A bunch of utility functions.