[Android Software/Hacking General [Developers Only]] amarullz:
Can you make a short video?

---

Ok thanks for the all language files... I will includes it in next release :D

INFO ABOUT LANGUAGE IN SCRIPT

There is 4 new function to support multilanguage & custom fonts:

fontresload - Load font/font-family relative to AROMA Resource directory "META-INF/com/google/android/aroma/"

fontload - Load font/font-family with absolute location in your zip file, you can use "system/fonts/DroidSans.ttf" from your zip with this function, so you don't need to copy any ttf files into AROMA Resource directory

loadlang - Load language file that will be used in next proccess

lang - Load language string for given language key

fontresload & fontload supported font-family, so you can add fonts that contain only ASCII glyph and Unicode glyph, because some fonts only have ascii only or some unicode characters only. If you request to write characters that didn't included in fonts, it will show rectangle in the screen. So for safest way in loading font is load multiple fonts that includes normal ascii and unicode chars that your language needs.

Here some information about android fonts:

DroidSans.ttf - Contains ascii, latin and russian characters (maybe others), it was safe font that I prefer to always included.

DroidSansArabic.ttf - Contains only arabic characters (no ascii/latin), so if you just include this font, the ascii chars will shown as rectangle

DroidSansFallback.ttf - Contains many characters, I still don't investigate it more deeply yet, but it contains china, japan, korean chars. But for safety, also include DroidSans.ttf.

Use semicolon ";" to load multiple fonts (And no space between it):

fontresload( "0", "ttf/DroidSans.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" );

fontload( "0", "system/fonts/DroidSans.ttf;system/fonts/DroidSansArabic.ttf;system/fonts/DroidSansFallback.ttf;", "12" );

Sintax:

fontresload(
"0", #-- Font Code. "0"=Small font (contents), "1"=Big Font (title)
"path to fonts", #-- Path to fonts
"12" #-- Font Size
);

About lang function

You may ask, what different of lang() function and lang-tag in ams?

lang-tags: "Here The <~langtag>"

The different was, the lang() function will directly return the string resource, while the lang-tag will replaced when the string will rendered in screen.

Here the example:

language.lang
-------------
test.key=This is a test

aroma-config
-------------
loadlang("language.lang");

#-- test variable will contains "This is a test"
setvar(
"test", lang("test.key")
);

#-- test2 variable will contains "<~test.key>"
setvar(
"test2", "<~test.key>"
);

#-- alert will show "This is a test - This is a test"
alert(
"Test Alert",
lang("test.key")+" - <~test.key>"
);

# or

alert(
"Test Alert",
getvar("test")+" - "+getvar("test2")
);

So there is something you want to try like this:

language.lang

myname=Ahmad Amarullah
name=My Name is <~myname>

aroma-config

loadlang("language.lang");

alert(
"Test 1",
lang("name");
);

alert(
"Test 1",
"<~name>"
);

Do you know What will happened? Yes, the first alert will shown "My Name is Ahmad Amarullah", while the second alert was "My Name is <~myname>".

Why?... Because it don't do the recursive check for faster and safer implementation...