I just realized that I made my last post 3 weeks ago. In any case, I staggered my learning with building a simple starter app and just finished my last bit of logic this am. Figured I would share in hopes of some sort dopamine activity via validation.

The App:

  • Has 2 sets of strings that are common phrases that people might use while navigating eating out at restaurants where language barriers might be an issue.
  • First set in bold are translated in the app via the Language tab
  • Second smaller set are translated based on the phone’s locale settings.

The idea is that the phone owner should be able to read the text as well, so I wanted 2 sets for when one party speaks one language and the other party speaks another. I mostly wanted to have the challenge of handling translations from within and outside the app and figured why not.

The phrases can be toggled with the green buttons on the bottom. This is to fine tune the dietary preferences. Vegan will toggle everything but gluten as “cannot consume” or will set it for relative vegetarian(so no meat or fish but yes dairy and eggs)

I put gluten in there for anyone who has Celiac. I have found a frightening number of waitstaff that just assume that both veganism and gluten allergy is just “fad diets” so I wanted to include both for the little bit of crossover between the 2 lifestyle diets.

Screenshot with French for phone language and Spanish for in app language:

github: https://github.com/AndroidHell/ImVeganBTW

Notes:

  • The app title translate based on phone language but it should be based on in-app language since it’s meant more for the person taking a food order to know "I’m Vegan. I might have it change based on vegan or vegetarian for the in-app language but I suppose that is handled by the first card. 🤔
  • The nav buttons are not translated and localizing those would be good
  • if text in the cards is too long, it gets cut off with … at the end. This is a similar issue to the Jerboa app nav buttons for some languages. I might make the strings shorter(lazy route) or try to write some sort of scroll/ticker or make each card expand with full text.
  • The source code is a fucking mess. I already know. I started working on viewModel stuff before actually learning about it or app architecture.
  • Translations were done by Google Translate so if they are wrong maybe let me know and I can fix them. I only speak English so had to rely on Google on this.
  • I tried to pick main languages that I could come across in the States. I think they should work in other parts of the world but I used Mexican Spanish and Simplified Chinese so I donno how that might work out elsewhere.
  • ghostOfRoux();OP
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    Lol thanks! I still don’t quite know what I’m doing. I need to definitely finish going over viewModel and revisit how scaffolding is supposed to work.

    Kotlin is definitely weird compared to what I’ve done in the past but I think I like it.