Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android XML support #64

Open
Martysh12 opened this issue Apr 30, 2024 · 0 comments
Open

Android XML support #64

Martysh12 opened this issue Apr 30, 2024 · 0 comments

Comments

@Martysh12
Copy link
Contributor

Martysh12 commented Apr 30, 2024

Support Android's strings.xml translation format.

How it works

The values directory (which is usually located at app/src/main/res, although not always) contains a strings.xml file, which contains a list of strings and their base translations:

<resources>
    <string name="app_name">My App</string>
    <string name="some_string">Some String</string>
    <string name="lorem">Lorem Ipsum</string>
</resources>

Additionally in the res directory, there may be other values directories with language qualifiers (appended after values with a dash, for example values-iw for Hebrew values). This directory may also contain a strings.xml file:

<resources>
    <string name="app_name">האפליקציה שלי</string>
    <string name="some_string">מחרוזת כלשהי</string>
    <string name="lorem">לוח לשון</string>
</resources>

Additional resources

I can't possibly explain how all of Android's resource system works without turning this into an essay, so I'll link these helpful pages:

If you need additional help with tackling the issue, feel free reach out to me on Discord :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant