https://github.com/seanghay/locale-parser
Parse simple text as an Android XML Resource files powered by Vue.js, Vite.js and WindiCSS
https://github.com/seanghay/locale-parser
android android-localization vitejs vue windicss
Last synced: 2 months ago
JSON representation
Parse simple text as an Android XML Resource files powered by Vue.js, Vite.js and WindiCSS
- Host: GitHub
- URL: https://github.com/seanghay/locale-parser
- Owner: seanghay
- License: apache-2.0
- Created: 2021-03-23T03:03:11.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-23T10:03:37.000Z (about 4 years ago)
- Last Synced: 2025-01-22T20:11:17.816Z (over 1 year ago)
- Topics: android, android-localization, vitejs, vue, windicss
- Language: Vue
- Homepage: https://locale-parser.netlify.app/
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Android Locale Parser
Parse simple text as an Android XML Resource files powered by Vue.js, Vite.js and WindiCSS
### Basic Usage
This will generated each folder corresponding to the locale.
```
locale: Content
locale2: Content2
locale3: Content3
```
Output:
`locale`
```xml
Content
```
---
`locale2`
```xml
Content2
```
---
`locale3`
```xml
Content3
```
---
### Headers
Keep our resource string tidy by specifying a header.
```
MainActivity
locale: Content
locale2: Content2
locale3: Content3
```
Output:
`locale`
```xml
Content
```
`locale2`
```xml
Content2
```
`locale3`
```xml
Content3
```
### Resource Name
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`
```xml
Content
```
`locale2`
```xml
Content2
```
`locale3`
```xml
Content3
```
---
### Specify Output Files
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
```