How to add multilanguage support to a Yocto build?

给你一囗甜甜゛ 提交于 2019-12-22 18:15:26

问题


I'm trying to add multilanguage support to a Yocto build. Reading the official documentation I've found that the build options that controls locale settings are:

  • GLIBC_GENERATE_LOCALES
  • IMAGE_LINGUAS

Link: http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#var-GLIBC_GENERATE_LOCALES

After a build with the following options:

GLIBC_GENERATE_LOCALES="en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS?="en-gb"

if I ask to "localectl" the list of available locales, nothing is displayed (command: localectl list-locales).

Another bit of info, the output of the "locale" command is:

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

The output of "locale -a" command is:

C
POSIX

What am I missing?


回答1:


The locales were not generated because the IMAGE_LINGUAS variable was overwritten into another place (my fault).

The locales generated with IMAGE_LINGUAS, e.g. "en_GB" or "en_US", does not have the ".UTF-8" suffix in their name but they use the UTF-8 encoding. To check if a locale is UTF-8 refer to: https://stackoverflow.com/a/42797421/5321161



来源:https://stackoverflow.com/questions/41956471/how-to-add-multilanguage-support-to-a-yocto-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!