2012-04-15 16:54:38 +00:00
|
|
|
// This file is part of Notepad++ project
|
|
|
|
// Copyright (C)2003 Don HO <don.h@free.fr>
|
2010-03-05 00:15:06 +00:00
|
|
|
//
|
2012-04-15 16:54:38 +00:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either
|
|
|
|
// version 2 of the License, or (at your option) any later version.
|
2010-03-05 00:15:06 +00:00
|
|
|
//
|
2012-04-15 16:54:38 +00:00
|
|
|
// Note that the GPL places important restrictions on "derived works", yet
|
|
|
|
// it does not provide a detailed definition of that term. To avoid
|
|
|
|
// misunderstandings, we consider an application to constitute a
|
|
|
|
// "derivative work" for the purpose of this license if it does any of the
|
|
|
|
// following:
|
|
|
|
// 1. Integrates source code from Notepad++.
|
|
|
|
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
|
|
|
|
// installer, such as those produced by InstallShield.
|
|
|
|
// 3. Links to a library or executes a program that does any of the above.
|
2010-03-05 00:15:06 +00:00
|
|
|
//
|
2012-04-15 16:54:38 +00:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
2010-03-05 00:15:06 +00:00
|
|
|
|
|
|
|
#ifndef LOCALIZATION_H
|
|
|
|
#define LOCALIZATION_H
|
|
|
|
|
|
|
|
#ifndef TINYXMLA_INCLUDED
|
|
|
|
#include "tinyxmlA.h"
|
|
|
|
#endif //TINYXMLA_INCLUDED
|
|
|
|
|
2011-01-22 23:53:35 +00:00
|
|
|
class FindReplaceDlg;
|
|
|
|
class PreferenceDlg;
|
2011-10-23 12:53:16 +00:00
|
|
|
class ShortcutMapper;
|
|
|
|
class UserDefineDialog;
|
2011-01-19 21:05:40 +00:00
|
|
|
|
2010-03-05 00:15:06 +00:00
|
|
|
class NativeLangSpeaker {
|
|
|
|
public:
|
|
|
|
NativeLangSpeaker():_nativeLangA(NULL), _nativeLangEncoding(CP_ACP), _isRTL(false), _fileName(NULL){};
|
2010-03-24 21:08:50 +00:00
|
|
|
void init(TiXmlDocumentA *nativeLangDocRootA, bool loadIfEnglish = false);
|
2010-03-05 00:15:06 +00:00
|
|
|
void changeConfigLang(HWND hDlg);
|
|
|
|
void changeLangTabContextMenu(HMENU hCM);
|
|
|
|
TiXmlNodeA * searchDlgNode(TiXmlNodeA *node, const char *dlgTagName);
|
|
|
|
bool changeDlgLang(HWND hDlg, const char *dlgTagName, char *title = NULL);
|
|
|
|
void changeLangTabDrapContextMenu(HMENU hCM);
|
2011-06-18 22:54:32 +00:00
|
|
|
generic_string getSpecialMenuEntryName(const char *entryName);
|
|
|
|
generic_string getNativeLangMenuString(int itemID);
|
2010-03-05 00:15:06 +00:00
|
|
|
void changeMenuLang(HMENU menuHandle, generic_string & pluginsTrans, generic_string & windowTrans);
|
|
|
|
void changeShortcutLang();
|
|
|
|
void changeShortcutmapperLang(ShortcutMapper * sm);
|
|
|
|
void changeStyleCtrlsLang(HWND hDlg, int *idArray, const char **translatedText);
|
|
|
|
void changeUserDefineLang(UserDefineDialog *userDefineDlg);
|
2012-10-04 21:21:03 +00:00
|
|
|
void changeUserDefineLangPopupDlg(HWND hDlg);
|
2010-03-05 00:15:06 +00:00
|
|
|
void changeFindReplaceDlgLang(FindReplaceDlg & findReplaceDlg);
|
|
|
|
void changePrefereceDlgLang(PreferenceDlg & preference);
|
|
|
|
bool isRTL() const {
|
|
|
|
return _isRTL;
|
|
|
|
};
|
|
|
|
|
|
|
|
const char * getFileName() const {
|
|
|
|
return _fileName;
|
|
|
|
};
|
|
|
|
|
|
|
|
const TiXmlNodeA * getNativeLangA() {
|
|
|
|
return _nativeLangA;
|
|
|
|
};
|
|
|
|
|
|
|
|
int getLangEncoding() const {
|
|
|
|
return _nativeLangEncoding;
|
|
|
|
};
|
2011-01-19 21:05:40 +00:00
|
|
|
bool getMsgBoxLang(const char *msgBoxTagName, generic_string & title, generic_string & message);
|
2011-10-23 12:53:16 +00:00
|
|
|
generic_string getProjectPanelLangMenuStr(const char * nodeName, int cmdID, const TCHAR *defaultStr) const;
|
2013-10-28 19:18:01 +00:00
|
|
|
//generic_string getFunctionListPanelLangStr(const char *nodeName, const TCHAR *defaultStr) const;
|
2013-10-25 07:32:04 +00:00
|
|
|
generic_string getAttrNameStr(const TCHAR *defaultStr, const char *nodeL1Name, const char *nodeL2Name = NULL) const;
|
2015-05-17 17:09:21 +00:00
|
|
|
int messageBox(const char *msgBoxTagName, HWND hWnd, const TCHAR *message, const TCHAR *title, int msgBoxType, int intInfo = 0, const TCHAR *strInfo = NULL);
|
2010-03-05 00:15:06 +00:00
|
|
|
private:
|
|
|
|
TiXmlNodeA *_nativeLangA;
|
|
|
|
int _nativeLangEncoding;
|
|
|
|
bool _isRTL;
|
|
|
|
const char *_fileName;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOCALIZATION_H
|