An open API service indexing awesome lists of open source software.

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

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
```