Parse simple text as an Android XML Resource files powered by Vue.js, Vite.js and WindiCSS
This will generated each folder corresponding to the locale.
locale: Content
locale2: Content2
locale3: Content3
Output:
locale
<string name="">Content</string>
locale2
<string name="">Content2</string>
locale3
<string name="">Content3</string>
Keep our resource string tidy by specifying a header.
MainActivity
locale: Content
locale2: Content2
locale3: Content3
Output:
locale
<!-- [MainActivity] -->
<string name="">Content</string>
locale2
<!-- [MainActivity] -->
<string name="">Content2</string>
locale3
<!-- [MainActivity] -->
<string name="">Content3</string>
If you need to specify name
for each item, you can use #hashtag
. The hashtag can be placed anywhere in the header.
MainActivity #title_content_main
locale: Content
locale2: Content2
locale3: Content3
Output:
locale
<!-- [MainActivity] -->
<string name="title_content_main">Content</string>
locale2
<!-- [MainActivity] -->
<string name="title_content_main">Content2</string>
locale3
<!-- [MainActivity] -->
<string name="title_content_main">Content3</string>
In some cases, you might need to have different file name rather than strings.xml
.
You can do that by using @file
directive followed by the desired filename.
@file: my_file_name
en: English
km: ខ្មែរ
Result:
├── values
│ └── my_file_name.xml
└── values-km
└── my_file_name.xml
2 directories, 2 files