Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

RC Localization Tool (LocalizeRC)

, 14 Jan 2004 BSD
A tool for localizing/translating Resource Scripts
localizerc.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc1.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_15.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_ansi14.zip
LocalizeRC.exe
LocalizeRC07.dll
localizerc_src.zip
res
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
LocalizeRC.dsw
German
German.dsp
German.ini
German.lws
res
LocalizeRC.ico
LocalizeRC.manifest
localizerc_src1.zip
LocalizeRC.dsw
LocalizeRC.ico
LocalizeRC.manifest
German.dsp
German.ini
German.lws
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
localizerc_src14.zip
LocalizeRC.ico
LocalizeRC.manifest
German.dsp
German.ini
German.lws
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
LocalizeRC.dsw
localizerc_src_15.zip
German.dsp
German.ini
German.lws
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.ico
LocalizeRC.manifest
LocalizeRC.dsp
LocalizeRC.dsw
LocalizeRC.ncb
localizerc_unicode.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_unicode1.zip
LocalizeRC.exe
LocalizeRC07.dll
localizerc_unicode14.zip
LocalizeRC07.dll
LocalizeRC.exe
localizerc_unicode_15.zip
LocalizeRC07.dll
LocalizeRC.exe
// LocalizeRCDlg.h : header file
//

#pragma once
#include <tchar.h>
#include "afxcmn.h"
#include "afxwin.h"

// CLocalizeRCDlg dialog
class CLocalizeRCDlg : public CDialog
{
// Construction
public:
	CLocalizeRCDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_LOCALIZERC_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON hLargeIcon, hSmallIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	// content of rich edit control (input RC)
	CString m_strEdit;

	// filename of resource-file with source language
	CString strInputRC;
	// file of the INI File with IDC and text-strings
	CString strLangINI;
	// filename of the generated RC
	CString strOutputRC;
	
	BOOL m_bCopy;
	LANGID LangID;
	int m_nObsoleteItems;
	CString m_strWorkspace;
	CComboBox m_CtrlLanguage;

	// checks if line contents strings that have to be translated
	bool MustBeTranslated(CString strLine, CString strKeyword);
	// search for '"' that is not a quotation mark inside the text ("")
	int FindQuote(CString strLine, int nStartPos=0);
	int WriteReadIni(bool bWrite);
	
	CString ExtractCaption(CString& strText, int* pnPosition, CString strKeyword, CString &strIDC);
	static CString GetFolder(CString strPath);

	afx_msg void OnBnClickedNewWorkspace();
	afx_msg void OnBnClickedChngWorkspace();
	afx_msg void OnBnClickedModifyworkspace();
	
	afx_msg void OnBnClickedReverseini();

	afx_msg void OnCbnSelchangeLanguage();
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedCreateini();
	afx_msg void OnBnClickedOpenini();
	afx_msg void OnBnClickedCreateoutput();

	BOOL OpenCreateWorkspaceDlg(BOOL bOpen);
	void OpenInputRC(void);
	BOOL LoadWorkspace(void);
	BOOL SaveWorkspace(void);
	CString GetAbsolutePathFromIni(CIniEx* pIniEx, CString strKey, CString strPath);
	CString m_strDetails;
	
	static int AddLanguage(CComboBox* pComboBox, LPCTSTR strLangCode, LANGID SelectedID);
	static CString StringTokenize(CString strSource, LPCTSTR strDelimiters, int* pnStart);
	static int FindSeperateWord(CString strText, LPCTSTR strWord, int nStartPos);

	static int StringSpanIncluding( LPCTSTR pszBlock, LPCTSTR pszSet ) throw()
	{
		return (int)_tcsspn( ( pszBlock ), ( pszSet ) );

	}

	static int StringSpanExcluding( LPCTSTR pszBlock, LPCTSTR pszSet ) throw()
	{
		return (int)_tcscspn( ( pszBlock ), ( pszSet ) );
	}
	CString m_strTextmode;
	afx_msg void OnCbnSelchangeObsItems();
	afx_msg void OnBnKillfocusCopy();
	afx_msg void OnBnKillfocusNosort();

	BOOL m_bNoSort;	
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

Konrad Windszus
Web Developer
Germany Germany
Author of the shareware WinCD.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 15 Jan 2004
Article Copyright 2003 by Konrad Windszus
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid