2023-05-12 05:45 AM
I need to create an application that can handle text translations with gettext() in C code.
How to add localizations to the image to be generated?
I added these configurations in the build recipe:
ENABLE_BINARY_LOCALE_GENERATION = "1"
GLIBC_GENERATE_LOCALES = "en_US.UTF-8 it_IT.UTF-8 en_GB.UTF-8 ro_RO.UTF-8 es_CO.UTF-8 es_CL.UTF-8 pt_BR.UTF-8"
IMAGE_LINGUAS = "en_us it_it en_gb ro_ro es_co es_cl pt_br"
With the following errors:
ERROR: image-rel-1.0-r0 do_rootfs: Unable to install packages. Command 'openstlinux-5.10-dunfell-mp1-21-11-17/build/tmp-glibc/work/board-ostl-linux-gnueabi/image-rel/1.0-r0/recipe-sysroot-native/usr/bin/ apt-get install --force-yes --allow-unauthenticated --no-remove locale-base-en_us locale-base-it_it locale-base-en_gb locale-base-ro_ro locale-base-es_co locale-base-es_cl locale -base-pt_br' returned 100:
Reading package lists...
Building dependency tree...
E: Unable to locate package locale-base-en_us
E: Unable to locate package locale-base-it_it
E: Unable to locate package locale-base-en_gb
E: Unable to locate package locale-base-ro_ro
E: Unable to locate package locale-base-es_co
E: Unable to locate package locale-base-es_cl
E: Unable to locate package locale-base-pt_br
Could you tell me the correct procedure to add the necessary localizations?
Solved! Go to Solution.
2023-05-23 01:28 AM
Hi @AgaGioUmpiSrl
I am not sure but I think there could be a typo in the line:
IMAGE_LINGUAS = "en_us it_it en_gb ro_ro es_co es_cl pt_br"
Could you make a new attempt by replacing it with the following line:
IMAGE_LINGUAS = "en-us it-it en-gb ro-ro es-co es-cl pt-br"
Original characters «_» have been replaced by «-».
Best regards,
--JM
2023-05-23 01:28 AM
Hi @AgaGioUmpiSrl
I am not sure but I think there could be a typo in the line:
IMAGE_LINGUAS = "en_us it_it en_gb ro_ro es_co es_cl pt_br"
Could you make a new attempt by replacing it with the following line:
IMAGE_LINGUAS = "en-us it-it en-gb ro-ro es-co es-cl pt-br"
Original characters «_» have been replaced by «-».
Best regards,
--JM
2023-05-24 05:23 AM
Thanks Jean-Marc, that's how it works!