<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cyberkoa</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cyberkoa"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Cyberkoa"/>
	<updated>2026-05-07T02:49:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Internationalization&amp;diff=4447</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Internationalization&amp;diff=4447"/>
		<updated>2007-02-08T23:17:55Z</updated>

		<summary type="html">&lt;p&gt;Cyberkoa: /* The translation tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
&lt;br /&gt;
This article is about how to realize and use localized C:B. All the works have been done under Windows XP SP2.&lt;br /&gt;
&lt;br /&gt;
== Get the English POT file ==&lt;br /&gt;
&lt;br /&gt;
The english POT file url is:&lt;br /&gt;
&lt;br /&gt;
https://developer.berlios.de/patch/?func=detailpatch&amp;amp;patch_id=822&amp;amp;group_id=5358&lt;br /&gt;
 &lt;br /&gt;
I will update this file periodically. Of course, you can use the tool which I have created (see belown) to generate the POT file.&lt;br /&gt;
&lt;br /&gt;
The content of the tool which is named as '''intl.bat''' is below:&lt;br /&gt;
&lt;br /&gt;
 rem ======= Begin of intl.bat =======&lt;br /&gt;
 &lt;br /&gt;
 @echo off&lt;br /&gt;
 wxrc src\resources\*.xrc -g -o  src\src-xrc.cpp&lt;br /&gt;
 wxrc sdk\resources\*.xrc -g -o  sdk\sdk-xrc.cpp&lt;br /&gt;
 wxrc plugins\astyle\resources\*.xrc -g -o  plugins\astyle\astyle-xrc.cpp&lt;br /&gt;
 wxrc plugins\classwizard\resources\*.xrc -g -o  plugins\classwizard\classwizard-xrc.cpp&lt;br /&gt;
 wxrc plugins\codecompletion\resources\*.xrc -g -o  plugins\codecompletion\codecompletion-xrc.cpp&lt;br /&gt;
 wxrc plugins\compilergcc\resources\*.xrc -g -o  plugins\compilergcc\compilergcc-xrc.cpp&lt;br /&gt;
 wxrc plugins\debuggergdb\resources\*.xrc -g -o  plugins\debuggergdb\debuggergdb-xrc.cpp&lt;br /&gt;
 wxrc plugins\defaultmimehandler\resources\*.xrc -g -o  plugins\defaultmimehandler\defaultmimehandler-xrc.cpp&lt;br /&gt;
 wxrc plugins\todo\resources\*.xrc -g -o  plugins\todo\todo-xrc.cpp&lt;br /&gt;
 wxrc plugins\autosave\*.xrc -g -o  plugins\autosave\autosave-xrc.cpp&lt;br /&gt;
 wxrc plugins\scriptedwizard\resources\plugins\*.xrc -g -o  plugins\scriptedwizard\resources\plugins\scriptedwizard-xrc.cpp&lt;br /&gt;
 wxrc plugins\scriptedwizard\resources\wxwidgets\*.xrc -g -o  plugins\scriptedwizard\resources\wxwidgets\wxwidgets-xrc.cpp&lt;br /&gt;
 &lt;br /&gt;
 if not exist po md po&lt;br /&gt;
 &lt;br /&gt;
 xgettext -C -n -k_ -o po\codeblocks.pot src\*.cpp src\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot src\wxAUI\*.cpp src\wxAUI\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot sdk\*.cpp sdk\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot sdk\propgrid\src\propgrid\*.cpp sdk\propgrid\include\wx\propgrid\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot sdk\wxFlatNotebook\*.cpp&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot sdk\scripting\bindings\*.cpp sdk\scripting\bindings\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\codecompletion\*.cpp plugins\codecompletion\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\codecompletion\parser\*.cpp plugins\codecompletion\parser\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\astyle\*.cpp plugins\astyle\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\astyle\astyle\*.cpp plugins\astyle\astyle\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\classwizard\*.cpp plugins\classwizard\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\codecompletion\*.cpp plugins\codecompletion\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\compilergcc\*.cpp plugins\compilergcc\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\debuggergdb\*.cpp plugins\debuggergdb\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\defaultmimehandler\*.cpp plugins\defaultmimehandler\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\todo\*.cpp plugins\todo\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\xpmanifest\*.cpp plugins\xpmanifest\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\autosave\*.cpp plugins\autosave\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\scriptedwizard\*.cpp plugins\scriptedwizard\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\scriptedwizard\resources\plugins\templates\*.cpp plugins\scriptedwizard\resources\plugins\templates\*.h&lt;br /&gt;
 xgettext -C -n -k_ -j -o po\codeblocks.pot plugins\scriptedwizard\resources\wxwidgets\common\*.cpp plugins\scriptedwizard\resources\wxwidgets\common\*.h&lt;br /&gt;
 pause&lt;br /&gt;
 &lt;br /&gt;
 rem ======= End of intl.bat =======&lt;br /&gt;
&lt;br /&gt;
== The translation tool ==&lt;br /&gt;
&lt;br /&gt;
Usually, we use the poEdit tool which can be downloaded [http://www.poedit.net/download.php here].&lt;br /&gt;
&lt;br /&gt;
== Translating in poEdit ==&lt;br /&gt;
&lt;br /&gt;
Rename codeblocks.pot into codeblocks.po. Use poEdit to open the file codeblocks.po. Change a few settings like:&lt;br /&gt;
&lt;br /&gt;
[File]-&amp;gt;[Preferences]-&amp;gt;[Personalize]&lt;br /&gt;
&lt;br /&gt;
[Catalog]-&amp;gt;[Settings]-&amp;gt;[Project info]-&amp;gt;[Team/email/Language/Charset]&lt;br /&gt;
&lt;br /&gt;
If Code::Blocks is compiled with Unicode, the charset should be set to utf-8; If Code::Blocks is compiled with ANSI, the charset should be set to your own language charset like gb2312, koi8-r etc.&lt;br /&gt;
&lt;br /&gt;
After these settings are done, you can start translating. Don't be fooled, it's a hard work! During the process, of course, you can use your translation at any time. &lt;br /&gt;
&lt;br /&gt;
== Create and use the .mo file ==&lt;br /&gt;
&lt;br /&gt;
Pressing Ctrl+S in poEdit, you can get a *.mo file like codeblocks.mo which is what we need. To use codeblocks.mo, we just place it into C:\Program Files\CodeBlocks or C:\Program Files\CodeBlocks\share\CodeBlocks\locale\&amp;lt;lang&amp;gt;\LC_MESSAGES or C:\Program Files\CodeBlocks\share\CodeBlocks\locale\&amp;lt;lang&amp;gt;. My language is Chinese and I have installed C::B into E:\, so I place codeblocks.mo into E:\Program Files\CodeBlocks\share\CodeBlocks\locale\zh_CN.&lt;br /&gt;
&lt;br /&gt;
If you want to use codeblocks.mo under Linux or Unix, you just place it into /usr/X11R6/share/locale/&amp;lt;lang&amp;gt;/LC_MESSAGES/. For example, I put it into /usr/X11R6/share/locale/zh_CN/LC_MESSAGES/ under FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Details about internationalization using wxWidgets can be found in the wxWidgets docs.&lt;br /&gt;
&lt;br /&gt;
== Let Code::Blocks support your language ==&lt;br /&gt;
&lt;br /&gt;
If you want Code::Blocks to support your language, you must modify the file '''\codeblocks\src\src\appglobals.cpp'''. In it, you can search for the word 'Chinese' to see the example. There are two vars about it:&lt;br /&gt;
&lt;br /&gt;
 const wxString langs[LANGUAGES_SIZE]&lt;br /&gt;
 const int locales[LANGUAGES_SIZE]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you have any questions, you can send me a mail: zxpmyth at yahoo.com.cn.&lt;/div&gt;</summary>
		<author><name>Cyberkoa</name></author>
	</entry>
</feed>