Difference between revisions of "Support other languages and keyboards than English in Yocto"

From KoanSoftware Wiki
Jump to: navigation, search
Line 11: Line 11:
 
  GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
 
  GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
 
  IMAGE_LINGUAS ?= "zh-cn"
 
  IMAGE_LINGUAS ?= "zh-cn"
 +
 +
If you need a '''keyboard localization''' support, it is required to start the '''loadkeys''' command at boot
 +
 +
loadkeys zh
  
  
Line 17: Line 21:
 
  GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fi_FI.UTF-8"
 
  GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fi_FI.UTF-8"
 
  IMAGE_LINGUAS = "fi-fi"
 
  IMAGE_LINGUAS = "fi-fi"
 +
 +
with '''keyboard localization''' support
 +
 +
loadkeys fi
 +
 +
 +
----
 +
 +
- Read this post in Koan wiki to learn [https://wiki.koansoftware.com/index.php/How_to_run_a_script_at_boot_automatically how to run a script at boot automatically] with '''sysvinint'''.
 +
 +
- Read this post in Koan wiki to learn [https://wiki.koansoftware.com/index.php/How_to_run_a_systemd_script_at_boot_automatically how to run a systemd script at boot automatically] with '''systemd'''.
 +
 +
 +
----
  
 
See the Yocto Project documentation for [https://docs.yoctoproject.org/ref-manual/variables.html?highlight=image_linguas#term-IMAGE_LINGUAS IMAGE_LINGUAS]
 
See the Yocto Project documentation for [https://docs.yoctoproject.org/ref-manual/variables.html?highlight=image_linguas#term-IMAGE_LINGUAS IMAGE_LINGUAS]

Revision as of 07:50, 4 March 2024

How to Support other languages and keyboards than English in Yocto

Generally Yocto release packages only support English character set.

When you need to support more languages for localization there is a solution.

In this example we are supporting Chinese character set in Yocto Project image.

Edit local.conf and add the following two lines to support Chinese keyboard:

GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS ?= "zh-cn"

If you need a keyboard localization support, it is required to start the loadkeys command at boot

loadkeys zh


Or these settings install the Finnish locales and set it as the default language and keyboard for the image:

GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fi_FI.UTF-8"
IMAGE_LINGUAS = "fi-fi"

with keyboard localization support

loadkeys fi



- Read this post in Koan wiki to learn how to run a script at boot automatically with sysvinint.

- Read this post in Koan wiki to learn how to run a systemd script at boot automatically with systemd.



See the Yocto Project documentation for IMAGE_LINGUAS