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();@lemmygrad.mlOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

      I just checked out DeepL and it seems pretty cool. I like that it offers alternate phrases, even if they don’t read that naturally. It’s missing one language I need in my app which I guess is understandable since it’s already an AI model translating 30 other languages into natural text. Paid API usages would be cool in a regular translation app. Maybe I can tackle that. Like have a box that you type in in your language and have a another with the selected language translation, just so you aren’t limited to canned responses?

      • ☭ Chay [they/them] ☭@lemmygrad.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Not sure if I understood correctly, if you have a field where you can type in your native language and then get the translation, aren’t you making a translator with extra steps?

        If you want to provide an APK, I’m willing to try it.

                • ghostOfRoux();@lemmygrad.mlOP
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  1 year ago

                  I only used GitHub because it’s an industry standard. It’s on my resume and most places I’m applying at knows GitHub. I can try and get an apk made of what I currently have once I get those last few things sorted out and send that your way.

                  It would mostly be just testing accuracy of the translations since that’s the only real feature. I guess testing on multiple screen sizes too but I’ve tested on 3 sizes so far.

                  • ☭ Chay [they/them] ☭@lemmygrad.ml
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    1 year ago

                    Alright, you could try mirroring on places like Codeberg if it isn’t a big hassle for you.

                    Sure! I have a few Android phones I could test it on, various screen sizes and Android versions.