how to translate Emacs menu into other languages

Chinese Forum

how to translate Emacs menu into other languages

Postby careone on Fri Jul 20, 2012 12:22 pm

new subject: how to translate Emacs menu into other languages
old subject: show Emacs menu in your mother language

if your Chinese is good, or you have some Chinese friends, see below for more: (in Chinese Simpified)
* Emacs中文菜单汉化包deb下载(emacs-locale-zh-cn)
http://forum.ubuntu.org.cn/viewtopic.php?f=17&t=212467

directly download .deb from here:
2012.7.16 updated,
for Emacs 21.x - 24.1 for Ubuntu/Debian/LinuxMint
emacs-locale-zh-cn_24.1-1~careone8_all.deb [729.65 KiB]
http://forum.ubuntu.org.cn/download/file.php?id=160198 (.deb directly download)

for Emacs 23.4/ 24.1 for Windows/Linux
2012.7.17 updated,
* fit for Emacs 23.4/24.1 for windows;
* fit for Emacs 21.x--24.x for Linux
emacs-locale-zh-cn4win-linux.v9.zip [968.59 KiB]
http://forum.ubuntu.org.cn/download/file.php?id=160258 (.zip directly download)

[2012/7/16 updated]
* maybe fit Emacs 21.x -- 24.x for Linux (.deb);

switch emacs menu with following options:
Code: Select all
sudo emacs-locale-zh-cn --m1 | --m2 | --en

ChangeLog for emacs-locale-zh-cn

emacs-locale-zh-cn
version: 24.1-1~careone8
2012/7/16 updated by Careone <careone@139.com>

FUNCTION
* add emacs-locale-zh-cn command to switch to Chinese with option:
--m1 active Scheme 1 for translated menu;
--m2 active Scheme 2 for translated menu;
--en return English menu (disable translated files and settings);

command full path: /usr/local/bin/emacs-locale-zh-cn
(note: you can modify/update this command file to fit your mother language on your will)

Scheme 1:
Code: Select all
sudo emacs-locale-zh-cn --m1

use english.el + chinese-menu.el + mule-menu.el

test pass: Emacs 22.x - 24.x;
--------------
* Scheme 2:
Code: Select all
sudo emacs-locale-zh-cn --m2

use translated lisp/menu-bar.el

testted pass/ not pass:
-- Emacs 23.1/Ubuntu 10.04 : testted pass;
-- Emacs 24.1 : not testted yet;
-- Emacs 22.3 : not pass (supportted terrible);
-- other Emacs versions: not testted yet;
--------------
known bugs:
* some submenu display in English yet;
* lisp/facemenu.el submenu displasy in English yet;
* lisp/bookmark.el not work;
* lisp/ediff-hook.el not work;
* Emacs 23.1/Ubuntu 10.04 , enable --m1 or --m2, game
tetris display some spinned blank lines (but Emacs for Windows works ok);

* Emacs for Windows: some translated menu show bad codings (but tips show well);

file/dir adjustment:
* translate file *.el (s) and place them to dir:
/usr/share/emacs/$VERSION/site-lisp/zh_CN/lisp/
just as where them from (compatible for multi versions and multi languages support well);

TODO
* more lisp/*/*.el files need be translated;

Code: Select all
$ emacs-locale-zh-cn -h

Usage: /usr/local/bin/emacs-locale-zh-cn [OPTION]
toggle Emacs locale to Chinese Simipified (zh_CN) with 2 different methods:
use "chinese-menu.el" or "menu-bar.el"

-a, --auto equals [ --chinese-menu ], recommended (root please) *
--m1, --chinese-menu toggle locale to zh_CN with chinese-menu.el
and some others (root please)
--m2, --menu-bar toggle locale to zh_CN with menu-bar.el
and some others (root please)
--en, --english restore locale to en_US (root please)
-l, --list list supportted Emacs versions and extra options
-v, --version print the version information and exit
-h, --help print this message and exit


file/dir tree
.
│ list.txt

├─bat.develop
│ tree-emacs-list.bat

├─linux
│ ├─etc
│ │ └─emacs
│ │ └─site-start.d
│ │ │ 86emacs-zh-cn.el
│ │ │
│ │ └─disabled.zh-cn.d
│ │ 86emacs-zh-cn.el
│ │ 87default-zh-cn.el
│ │
│ └─usr
│ ├─local
│ │ ├─bin
│ │ │ emacs-locale-zh-cn
│ │ │
│ │ └─share
│ │ └─careone
│ │ └─emacs-locale-zh-cn
│ │ │ ChangeLog.emacs-locale-zh-cn.txt
│ │ │ ChangeLog.menu-bar.el
│ │ │ emacs-download-from.txt
│ │ │ emacs-hotkeys.txt
│ │ │ readme.emacs-locale-zh-cn.gb2312.2012-05-21.txt
│ │ │ ubuntu-emacs-versions.txt
│ │ │
│ │ ├─bin
│ │ │ emacs-en2zh-cn_24.1.sed
│ │ │
│ │ ├─etc
│ │ │ sokoban.levels
│ │ │
│ │ ├─lisp
│ │ │ └─play
│ │ │ sokoban.el
│ │ │
│ │ ├─site-lisp
│ │ │ default.el
│ │ │
│ │ └─windows
│ │ │ init-win32.el
│ │ │ init-windows.el
│ │ │ w32-vars.el
│ │ │
│ │ ├─bat
│ │ │ tree-emacs-list.bat
│ │ │
│ │ └─reg
│ │ emacs-patch-zn-cn-23.4.reg
│ │ emacs-patch-zn-cn-24.1.reg
│ │ emacs-zn-cn-unreg.reg
│ │ mk.emacs-file-23.4.bat
│ │ mk.emacs-file-24.1.bat
│ │
│ └─share
│ └─emacs
│ ├─21.4
│ │ └─site-lisp
│ │ menu-bar.orig.el
│ │
│ ├─22.0.50
│ │ └─site-lisp
│ │ menu-bar.orig.el
│ │
│ ├─22.3
│ │ └─site-lisp
│ │ menu-bar.orig.el
│ │
│ ├─23.1
│ │ └─site-lisp
│ │ └─zh_CN
│ │ └─lisp
│ │ │ ediff-hook.el
│ │ │ facemenu.el
│ │ │ menu-bar.el
│ │ │ menu-bar.orig.el
│ │ │
│ │ ├─international
│ │ │ mule-cmds.el
│ │ │
│ │ ├─language
│ │ │ chinese.el
│ │ │
│ │ └─play
│ │ animate.el
│ │
│ ├─23.2
│ │ └─site-lisp
│ │ menu-bar.orig.el
│ │
│ ├─23.3
│ │ └─site-lisp
│ │ menu-bar.orig.el
│ │
│ ├─23.4
│ │ └─site-lisp
│ │ └─zh_CN
│ │ └─lisp
│ │ │ ediff-hook.el
│ │ │ facemenu.el
│ │ │ menu-bar.el
│ │ │ menu-bar.orig.el
│ │ │
│ │ ├─international
│ │ │ mule-cmds.el
│ │ │
│ │ ├─language
│ │ │ chinese.el
│ │ │
│ │ └─play
│ │ animate.el
│ │
│ ├─24.1
│ │ └─site-lisp
│ │ └─zh_CN
│ │ └─lisp
│ │ │ ediff-hook.el
│ │ │ facemenu.el
│ │ │ menu-bar.el
│ │ │ menu-bar.orig.el
│ │ │
│ │ ├─international
│ │ │ mule-cmds.el
│ │ │
│ │ ├─language
│ │ │ chinese.el
│ │ │
│ │ └─play
│ │ animate.el
│ │
│ └─site-lisp
│ │ chinese-menu.2006.el
│ │ chinese-menu.el
│ │ english-menu.el
│ │ linum.el
│ │ mule-menu.el
│ │
│ ├─other
│ │ line-num.el
│ │ linum+.el
│ │ linum-old.el
│ │ linum.el
│ │ wb-line-number.el
│ │
│ └─zh_CN
│ ├─.emacs.d
│ │ init.el
│ │
│ └─loadlist
│ loaddefs.el

└─windows
│ emacs-locale-zh-cn.txt

├─emacs-23.4
│ │ emacs-patch-zn-cn-23.4.reg
│ │ emacs-zn-cn-unreg.reg
│ │ emacs4windows-23.4-list.txt
│ │ mk.emacs-file-23.4.bat
│ │
│ └─site-lisp
│ │ default.el
│ │
│ └─zh_CN
│ └─lisp
│ │ ediff-hook.el
│ │ facemenu.el
│ │ menu-bar.el
│ │ menu-bar.orig.el
│ │
│ ├─international
│ │ mule-cmds.el
│ │
│ ├─language
│ │ chinese.el
│ │
│ └─play
│ animate.el

├─emacs-24.1
│ │ emacs-patch-zn-cn-24.1.reg
│ │ emacs-zn-cn-unreg.reg
│ │ emacs4windows-24.1-list.txt
│ │ mk.emacs-file-24.1.bat
│ │
│ └─site-lisp
│ │ default.el
│ │
│ └─zh_CN
│ └─lisp
│ │ ediff-hook.el
│ │ facemenu.el
│ │ menu-bar.el
│ │ menu-bar.orig.el
│ │
│ ├─international
│ │ mule-cmds.el
│ │
│ ├─language
│ │ chinese.el
│ │
│ └─play
│ animate.el

Attachments
emacs-locale-zh-cn.--m2.png
emacs-locale-zh-cn.--m2.png (11.06 KiB) Viewed 2474 times
Last edited by careone on Sat Jul 21, 2012 12:20 am, edited 1 time in total.
E-mail: Careone <careone@139.com>
User avatar
careone
Level 1
Level 1
 
Posts: 22
Joined: Sat Apr 18, 2009 11:39 pm

Linux Mint is funded by ads and donations.
 

Re: show Emacs menu in your mother language

Postby xenopeek on Fri Jul 20, 2012 1:30 pm

Moved here by moderator
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14544
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands


Return to 中文 (Chinese)

Who is online

Users browsing this forum: No registered users and 1 guest