cancel
Showing results for 
Search instead for 
Did you mean: 

Add new locale to image

AgaGioUmpiSrl
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Jean-Marc B
ST Employee

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

View solution in original post

2 REPLIES 2
Jean-Marc B
ST Employee

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

AgaGioUmpiSrl
Associate II

Thanks Jean-Marc, that's how it works!