Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
09778139
Commit
09778139
authored
21 years ago
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rewrite the i18n section.
parent
28036fd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
documentation/i18n.sgml
+37
-183
37 additions, 183 deletions
documentation/i18n.sgml
with
37 additions
and
183 deletions
documentation/i18n.sgml
+
37
−
183
View file @
09778139
...
@@ -5,202 +5,56 @@
...
@@ -5,202 +5,56 @@
<title>Adding New Languages</title>
<title>Adding New Languages</title>
<para>
<para>
Written by &name-morten-welinder; <email>&email-morten-welinder;</email>,
This file documents the necessary procedure for adding a new
January 1996.
language to the list of languages that Wine can display system
menus and forms in. Adding new translations is not hard as
it requires no programming knowledge or special skills.
</para>
</para>
<itemizedlist>
<listitem>
<para>
Thereafter revised February 1999 by Klaas van Gend
</para>
</listitem>
<listitem>
<para>
Revised again May 23, 1999, Klaas van Gend
</para>
</listitem>
<listitem>
<para>
Updated May 26, 2000, Zoran Dzelajlija
</para>
</listitem>
</itemizedlist>
<para>
<para>
(Extracted from <filename>wine/documentation/languages</filename>)
Language dependent resources reside in files
named <filename>somefile_Xx.rc</filename> or
<filename>Xx.rc</filename>, where <literal>Xx</literal>
is your language abbreviation (look for it in
<filename>include/winnls.h</filename>). These are included
in a master file named <filename>somefile.rc</filename> or
<filename>rsrc.rc</filename>, located in the same
directory as the language files.
</para>
</para>
<para>
<para>
This file documents the necessary procedure for adding a new
To add a new language to one of these resources you
language to the list of languages that Wine can display system
need to make a copy of the English resource (located
menus and forms in. Currently at least the following languages
in the <filename>somefile_En.rc</filename> file) over to
are still missing:
your <filename>somefile_Xx.rc</filename> file, include this
<simplelist columns="5" type="horiz">
file in the master <filename>somefile.rc</filename> file,
<member>Bulgarian</member>
and edit the new file to translate the English text.
<member>Chinese</member>
You may also need to rearrange some of the controls
<member>Greek</member>
to better fit the newly translated strings. Test your changes
<member>Icelandic</member>
to make sure they properly layout on the screen.
<member>Japanese</member>
<member>Romanian</member>
<member>Croatian</member>
<member>Slovak</member>
<member>Turkish</member>
<member>Slovanian</member>
</simplelist>
</para>
</para>
<note>
<para>
<emphasis>I hope I got all the places where changes are
needed. If you see any place missing from the list,
submit a patch to this file please. Also note that
re-organization of the source code might change the list of
places.</emphasis>
</para>
</note>
<para>
<para>
To add a new language you need to be able to translate the
In menus, the character "&" means that the next
relatively few texts, of course. You will need very little
character will be highlighted and that pressing that
knowledge of programming, so you have almost no excuses for
letter will select the item. You should place these
not adding your language, right? We should easily be able to
"&" characters suitably for your language, not just
support 20 languages within a few months, get going! Apart
copy the positions from English. In particular,
from re-compilation it'll take you about an hour or two.
items within one menu should have different highlighted
letters.
</para>
</para>
<para>
<para>
To add a new language to the list of languages that Wine can
To get a list of the files that need translating,
handle you must...
run the following command in the root of your Wine tree:
<command>find -name "*En.rc"</command>.
</para>
</para>
<orderedlist>
<para>
<listitem>
When adding a new language, also make sure the parameters
<para>
defined in <filename>./dlls/kernel/nls/*.nls</filename>
Find the language ID in
fit your local habits and language.
<filename>include/winnls.h</filename>.
</para>
</para>
</listitem>
<listitem>
<para>
Look in <filename>ole/ole2nls.c</filename> if your
language is already incorporated in the <varname>static
const struct NLS_langlocale</varname>. If not: find the
appropriate entries in
<filename>include/winnls.h</filename> and add them to the
list.
</para>
</listitem>
<listitem>
<para>
Edit the parameters defined in
<filename>ole/nls/*.nls</filename> to fit your local
habits and language.
</para>
</listitem>
<listitem>
<para>
Edit <filename>documentation/wine.man.in</filename>
(search for <parameter>-language</parameter>) to show the
new language abbreviation.
</para>
</listitem>
<listitem>
<para>
Edit <filename>misc/main.c</filename> variable
<varname>Languages</varname> to contain the new language
abbreviation and language ID. Also edit
<structname>struct option_table</structname> in
<filename>misc/options.c</filename> to show the new
abbreviation.
</para>
</listitem>
<listitem>
<para>
Edit <filename>include/options.h</filename>
<type>enum</type> <varname>WINE_LANGUAGE</varname> to have
a member called <literal>LANG_XX</literal> where
<literal>XX</literal> is the new abbreviation.
</para>
</listitem>
<listitem>
<para>
Create a new file
<filename>dlls/commdlg/cdlg_XX.rc</filename> (where
<literal>XX</literal> is your language abbreviation)
containing all menus. Your best bet is to copy
<filename>cdlg_En.rc</filename> and start translating.
There is no real need to know how the internal structure
of the file, as you only need to translate the text within
quotes.
</para>
<para>
In menus, the character "&" means that the next
character will be highlighted and that pressing that
letter will select the item. You should place these
"&" characters suitably for your language, not just
copy the positions from (say) English. In particular,
items within one menu should have different highlighted
letters.
</para>
</listitem>
<listitem>
<para>
Edit <filename>dlls/commdlg/rsrc.rc</filename> to contain
an <symbol>#include</symbol> statement for your
<filename>cdlg_XX.rc</filename> file.
</para>
</listitem>
<listitem>
<para>
Repeat steps 6 and 7 again for:
<itemizedlist>
<listitem>
<para>
<filename>dlls/shell32/shell32_XX.rc</filename> and
<filename>shres.rc</filename>
</para>
</listitem>
<listitem>
<para>
<filename>resources/sysres_XX.rc</filename> and
<filename>user32.rc</filename>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Re-configure, re-make dependencies, and re-make Wine.
</para>
</listitem>
<listitem>
<para>
Check your new menus and forms; when they're not ok, go
back to 6) and adapt the sizes, etc.
</para>
</listitem>
<listitem>
<para>
Several of the winelib based programs in the subdirectory
programs also have internationalization support. See the
appropriate files there for reference.
</para>
</listitem>
<listitem>
<para>
Edit <filename>documentation/internationalization</filename>
to show the new status.
</para>
</listitem>
<listitem>
<para>
Submit patches for inclusion in the next Wine release, see
file <filename>./ANNOUNCE</filename> for details about
where to submit.
</para>
</listitem>
</orderedlist>
</sect1>
</sect1>
</chapter>
</chapter>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment