Pregunta

I have a multilanguage application that uses the standard xml files to provide string values in different laguages.

...
res/values/strings.xml
res/values-es/strings.xml
res/values-pt/strings.xml
...

What I want to do is override the normal behavior of Android to look for a resource somewhere else before looking into the standard xml files.

So when the code calls getResources().getString() a custom code would look into an alternative resource file before falling back into the standard getString implementation.

Is there any way to achieve this?

thanks!

¿Fue útil?

Solución

Is there any way to achieve this?

No. For your own invocations of getString(), you can wrap those calls in your own code to check "somewhere else".

Otros consejos

The part you intend to achieve is not possible as Android by default would look only i the res folder for the required resources.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top