The acronym "ThMLT" stands for "Theme and Multilanguage Translation." It represents a component designed to manage themes (such as colors and fonts) and facilitate multilanguage support (translation) in AI2.
This extension offers a straightforward solution that I've been using in my personal projects. Recognizing its potential value to the broader community, I've opted to share it. I hope this extension proves beneficial to others.
Blocks
Usage
colorScheme
You can use any letter as a key. But
p
=ColorPrimary
s
=ColorSecondary
a
=ColorAccent
fonts
You can use any letter as key.
Except
r =FontRegular
b =FontBold
i =FontItalic
m =FontMaterial
If you want the bold/italic font to be the same as the regular font, set the value to "r" in your fonts value.
These keys will trigger the property blocks for Color and Fonts
translationFiles
Add your translation files as a JSON text
defaultLanguage
You can set default language for translation
In the label text:
- Begin with
{-
- If you wish to translate the label, use "t"; otherwise, use "n"
- Add your font key, such as "r" for regular
- Similarly, specify the color, like "p" for primary
- Conclude with
}
- Next, include your text. To facilitate translation, use the same key as in the JSON file.
In my case it is{-trp}name
V1 - com.hridoy.thmlt.aix (13.0 KB)
AIA - ThMLT_Test.aia (267.6 KB)
Open Source