Internationalized Sane

Andre Herms (aherms@prinz-atm.CS.Uni-Magdeburg.De)
Wed, 17 Mar 1999 14:24:20 +0100

--Boundary-=_JiVswMdkqtBxIXMVTRRbljpTnsNF
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Hello to everybody

I had an idea and want some opinions about that:

I think, it would be cool if sane could present the settings in different
languages (i.e. German). My first idea to do this: change the saneopts.h like
this

>enum { SANE_LANG_ENGLISH = 0,
> SANE_LANG_GERMAN,
> ...,
> SANE_NUM_LANGS};
>
>
>int SANE_Language;
>
>char *sane_title_brightness [SANE_NUM_LANGS] = {
> "brightness",
> "Helligkeit",
> ...};
>#define SANE_TITLE_BRIGHTNESS sane_title_brightness[SANE_Language]

this was my first idea, but this could never work with the backends. Most of
them define the title of an option by preiniting a var. No chance as
SANE_TITLE_BRIGHTNESS is no constant. It could help, if this would be done at
runtime, but therefor all backends need to be changed not so good.

So I have some little problems:

1) How shall SANE_Language be changed.
- it could be done by the frontend
- it could be a new param to SANE_Init ?
- it could be made an extra Option ( best compatible way for me)

2) Where shall the Strings be stored
- it could be put in a header-file. but the more strings, the bigger
the resulting file gets and it uses RAM.
- it could be stored to an extra text file. but than there must be some
functions for reading. And where to store this file.

I'd like to get some suggestions, whats the easiest way not to change all
backends or the Sane-standard

Thanx
Andre

--Boundary-=_JiVswMdkqtBxIXMVTRRbljpTnsNF
Content-Type: application/pgp-keys;
name="pgp key"
Content-Disposition: attachment; filename=public_key.asc
Content-Transfer-Encoding: base64

--Boundary-=_JiVswMdkqtBxIXMVTRRbljpTnsNF--

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com