1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #include "common/localization.h"
24 #include "common/translation.h"
25 
26 namespace Common {
27 
getLanguageYesNo(Language id,KeyCode & keyYes,KeyCode & keyNo)28 void getLanguageYesNo(Language id, KeyCode &keyYes, KeyCode &keyNo) {
29 	// If all else fails, use English as fallback.
30 	keyYes = KEYCODE_y;
31 	keyNo = KEYCODE_n;
32 
33 	switch (id) {
34 	case Common::RU_RUS:
35 		break;
36 	case Common::PL_POL:
37 		keyYes = Common::KEYCODE_t;
38 		break;
39 	case Common::HE_ISR:
40 		keyYes = Common::KEYCODE_f;
41 		break;
42 	case Common::ES_ESP:
43 		keyYes = Common::KEYCODE_s;
44 		break;
45 	case Common::IT_ITA:
46 		keyYes = Common::KEYCODE_s;
47 		break;
48 	case Common::FR_FRA:
49 		keyYes = Common::KEYCODE_o;
50 		break;
51 	case Common::DE_DEU:
52 		keyYes = Common::KEYCODE_j;
53 		break;
54 	default:
55 		break;
56 	}
57 }
58 
getLanguageYesNo(KeyCode & keyYes,KeyCode & keyNo)59 void getLanguageYesNo(KeyCode &keyYes, KeyCode &keyNo) {
60 #ifdef USE_TRANSLATION
61 	getLanguageYesNo(Common::parseLanguageFromLocale(TransMan.getCurrentLanguage().c_str()), keyYes, keyNo);
62 #else
63 	getLanguageYesNo(Common::EN_ANY, keyYes, keyNo);
64 #endif
65 }
66 
67 } // End of namespace Common
68