1141cc406Sopenharmony_ci2003-02-06
2141cc406Sopenharmony_ci
3141cc406Sopenharmony_ciThis directory contains translations for the options of the SANE backends.
4141cc406Sopenharmony_ciThey are only used if the gettext tools are found by configure.
5141cc406Sopenharmony_ciYou will need GNU gettext: xgettext, msgfmt and msgmerge. The translations
6141cc406Sopenharmony_ciare used at least by the frontends XSane and quiteinsane.
7141cc406Sopenharmony_ci
8141cc406Sopenharmony_ci
9141cc406Sopenharmony_ciUsers: I want to just read the description of SANE options in my language
10141cc406Sopenharmony_ci-------------------------------------------------------------------------
11141cc406Sopenharmony_ci
12141cc406Sopenharmony_ciUse XSane (>=0.90) or your favourite frontend that supports translations, read
13141cc406Sopenharmony_cithe documentation and set the environment variable LANG to your local setting.
14141cc406Sopenharmony_ciExample for German: export LANG=de_DE ; xsane
15141cc406Sopenharmony_ci
16141cc406Sopenharmony_ci
17141cc406Sopenharmony_ciTranslators: I want to update existing translations
18141cc406Sopenharmony_ci---------------------------------------------------
19141cc406Sopenharmony_ci
20141cc406Sopenharmony_ci* cd po ; make update-po
21141cc406Sopenharmony_ci* Edit $lang.po, add/change translations. (with $lang = your
22141cc406Sopenharmony_ci  language, e.g. "de"). You need an editor that is capable of using the
23141cc406Sopenharmony_ci  encoding UTF8 (unicode).
24141cc406Sopenharmony_ci* Add your name to the header. Update the "last translator" field.
25141cc406Sopenharmony_ci* make ; make install
26141cc406Sopenharmony_ci
27141cc406Sopenharmony_ci
28141cc406Sopenharmony_ciTranslators: I want to add a new language
29141cc406Sopenharmony_ci-----------------------------------------
30141cc406Sopenharmony_ci
31141cc406Sopenharmony_ci* Add the language code to po/LINGUAS
32141cc406Sopenharmony_ci* ./config.status || ./configure
33141cc406Sopenharmony_ci* cp po/sane-backends.pot po/$lang.po
34141cc406Sopenharmony_ci  Replace $lang with the language code you added to po/LINGUAS.
35141cc406Sopenharmony_ci* Go ahead with "I want to update existing translations".
36141cc406Sopenharmony_ci
37141cc406Sopenharmony_ci
38141cc406Sopenharmony_ciBackend developers: I want to add internationalization support for my backend
39141cc406Sopenharmony_ci-----------------------------------------------------------------------------
40141cc406Sopenharmony_ci
41141cc406Sopenharmony_ci* Edit the source code of the backend and add SANE_I18N to the appropriate
42141cc406Sopenharmony_ci  strings. Mark the descriptions (desc) and titles of options with
43141cc406Sopenharmony_ci  SANE_I18N(). Do the same for string lists used in options. The name of
44141cc406Sopenharmony_ci  options must NOT be marked. Do NOT mark macros. Especially you don't need
45141cc406Sopenharmony_ci  to mark standard option strings like SANE_TITLE_NUM_OPTIONS as this is
46141cc406Sopenharmony_ci  already done in saneopts.h.
47141cc406Sopenharmony_ci  Examples: s->opt[5].title = SANE_I18N("Enhancement");
48141cc406Sopenharmony_ci            #define STANDARD_FORMAT SANE_I18N("a4 Paper")
49141cc406Sopenharmony_ci* Edit po/POTFILES.in. Add all source code files that contain strings marked
50141cc406Sopenharmony_ci  by SANE_I18N() to that file.
51141cc406Sopenharmony_ci* If you want to also add a new language, see above.
52141cc406Sopenharmony_ci* ./config.status || ./configure
53141cc406Sopenharmony_ci* See "Update existing translations" or "Add a new language".
54141cc406Sopenharmony_ci
55141cc406Sopenharmony_ci
56141cc406Sopenharmony_ciFrontend developers: I want to add internationalization support for my frontend
57141cc406Sopenharmony_ci-------------------------------------------------------------------------------
58141cc406Sopenharmony_ci
59141cc406Sopenharmony_ci* The Makefile installs files called "sane-backends.mo" in the directory
60141cc406Sopenharmony_ci  "$(prefix)/share/locale/lang/LC_MESSAGES/", e.g.:
61141cc406Sopenharmony_ci  "/usr/local/share/locale/de/LC_MESSAGES/sane-backends.mo". For every
62141cc406Sopenharmony_ci  language exactly one .mo file is installed. Earlier releases of
63141cc406Sopenharmony_ci  sane-backends installed one file per backend, e.g. sane-umax.mo. For
64141cc406Sopenharmony_ci  backward compatibility, frontends may want to check for these files, also.
65141cc406Sopenharmony_ci* As mentioned above, GNU gettext is used.
66141cc406Sopenharmony_ci* With other NLS implementations, converting the mo files may work.
67