All supported languages can be found and verified under <AndroidSourceRoot>/framework/base/core/res/res, for example:
values-ar, values-ar-rEG, values-ar-rIL...., ar, ar-rEG, ar-rIL is the location code.
create your own language setting's mk file or modify one example mk file under <AndroidSourceRoot>/build/target/products, for example:
languages_full.mk
config product mk file to use the language setting mk file, for example
PRODUCT_LOCALES += en_US
$(call inherit-product, build/target/product/languages_mysetting.mk)