Google Play is now offering automated app-string translation using Gemini for free:
https://support.google.com/googleplay/android-developer/answer/9844778
This could potentially be a very simple way to make Solar2D apps multilingual with almost zero developer effort. Google automatically translates the strings supplied as Android string resources and integrates the translations into the app bundle.
The catch is that Solar2D doesn’t currently expose Android string resources to Lua.
Would it be possible to add support for these resources? Ideally I’d envisage two functions, something along the lines of:
local text = native.getStringResource("welcome_message")
for retrieving an individual localized string, and:
local strings = native.getStringResources()
for retrieving all of the localized string resources as a Lua table.
The second option would be particularly useful for games/apps containing thousands of strings. We could generate the source Android string resources automatically from our existing localisation tables, let Google/Gemini generate all the translations, and then retrieve the complete localized set into Lua in a single operation at startup. It would also be nice to be able to change the selected language at runtime too. Maybe:
native.setStringResourcesLanguage(<ISO language code>)
That would potentially allow Solar2D developers to support a huge number of languages with very little additional development work.