simonpoole / PoParser

Simplistic JavaCC parser for .po files mainly useful on Android
MIT License
1 stars 0 forks source link

I don't see how this works with different locales #5

Closed garpinc closed 9 months ago

garpinc commented 2 years ago

I don't see anyplace in code to use a translation based on locale. Is that not supported?

simonpoole commented 9 months ago

Currently you simply need to open the file containing the translations for the correct locale and create an InputStream from it.

As the filename format can essentially be arbitrary we would have to support providing a filename template and the locale to be able to handle this in the library. We haven't done that to now because on Android we need to support opening the translation files in a couple of different places and some of them don't support conventional file semantics. But it would be completely possible.