Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
793 stars 187 forks source link

How to develop other language support, thank you #668

Open stark1030 opened 3 years ago

stark1030 commented 3 years ago

How to develop other language support, thank you

stark1030 commented 3 years ago

If someone tells me the method, I will open source the finished product. Thank you

Thinstation commented 3 years ago

locales are one of the hardest things to get your head around. There are parts from a lot of packages. Here is the .dna of the en_US locale. ,en_US_locale,0,0,lib/locale,0,,,,,,,,, glibc,UNICODE.so,0,0,lib/gconv,1,,,,,,,,, glibc,CP1252.so,0,0,lib/gconv,1,,,,,,,,, glibc,UTF-7.so,0,0,lib/gconv,1,,,,,,,,, glibc,IBM850.so,0,0,lib/gconv,1,,,,,,,,, glibc,ISO8859-1.so,0,0,lib/gconv,1,,,,,,,,, glibc,ANSI_X3.110.so,0,0,lib/gconv,1,,,,,,,,, glibc,UTF-32.so,0,0,lib/gconv,1,,,,,,,,, glibc,UTF-16.so,0,0,lib/gconv,1,,,,,,,,, glibc,IBM870.so,0,0,lib/gconv,1,,,,,,,,, glibc,ISO8859-15.so,0,0,lib/gconv,1,,,,,,,,, glibc,IBM437.so,0,0,lib/gconv,1,,,,,,,,, kbd,default8x16.psfu.gz,0,0,lib/kbd/consolefonts,1,,,,,,,,, kbd,linux-keys-bare.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,euro1.map.gz,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,compose.latin1,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,qwerty-layout.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,linux-with-alt-and-altgr.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,linux-with-modeshift-altgr.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,linux-keys-extd.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,compose.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,linux-with-two-alt-keys.inc,0,0,lib/kbd/keymaps/include,1,,,,,,,,, kbd,us.map.gz,0,0,lib/kbd/keymaps,1,,,,,,,,, xorg-libx11,XLC_LOCALE,0,0,lib/X11/locale/C,1,,,,,,,,, xorg-libx11,XI18N_OBJS,0,0,lib/X11/locale/C,1,,,,,,,,, EMPTY,Compose,0,0,lib/X11/locale/C,1,,,,,,,,, xorg-libx11,XLC_LOCALE,0,0,lib/X11/locale/iso8859-15,1,,,,,,,,, xorg-libx11,XI18N_OBJS,0,0,lib/X11/locale/iso8859-15,1,,,,,,,,, xorg-libx11,Compose,0,0,lib/X11/locale/iso8859-15,1,,,,,,,,, xorg-libx11,XLC_LOCALE,0,0,lib/X11/locale/en_US.UTF-8,1,,,,,,,,, xorg-libx11,XI18N_OBJS,0,0,lib/X11/locale/en_US.UTF-8,1,,,,,,,,, xorg-libx11,Compose,0,0,lib/X11/locale/en_US.UTF-8,1,,,,,,,,, xorg-libx11,XLC_LOCALE,0,0,lib/X11/locale/iso8859-1,1,,,,,,,,, xorg-libx11,XI18N_OBJS,0,0,lib/X11/locale/iso8859-1,1,,,,,,,,, xorg-libx11,Compose,0,0,lib/X11/locale/iso8859-1,1,,,,,,,,, xkeyboard-config,us,0,0,lib/X11/xkb/symbols,1,,,,,,,,, ,dependencies,0,0,,0,,,,,,,,, ,en_US.template,0,0,build,0,,,,,,,,,

You can see that we get character conversion libraries from glibc and xorg-libx11 We get keyboard support from kbd, xkeyboard-config

It is possible to include all the glibc gconv libs, kbd, xkeyboard-config and xorg-libx11 files into an image, then you would only have to build the locale db for your region, but that's a lot of files that most people won't use, and that's not the ThinStation way.

To do things like the ThinStation way, you would need to track down the gconv modules for your region, kbd files, xorg-libx11 files and xkeyboard-config files. Use an existing locale as a template.

Here is the contents of en_US locale db template.

en_US,ISO-8859-1,en_US en_US,ISO-8859-1,en_US.ISO-8859-1 en_US,ISO-8859-15,en_US.ISO-8859-15 en_US,UTF-8,en_US.UTF-8

You would have to make such a template for any language you want to create.

stark1030 commented 3 years ago

Thank you very much for your reply