If you ever need an access to localized strings fr...
# feed
y
@Daniel Kunis [JB] here is an approach I was talking about
👀 1
j
If you visit the page https://developer.android.com/reference/android/content/res/Resources#getIdentifier(java.lang.String,%20java.lang.String,%20java.lang.String) you can read
Note: use of this function is discouraged. It is much more efficient to retrieve resources by identifier than by name.
☝️ 1
So I am not so sure this is the best solution
But a very doable solution and I guess in many cases shouldn't give an actual performance impact
y
Yes, totally depends on your needs.
a
y
Doesn't work for us because we already have our strings provided by native modules with 3rd party integrations for translations. Shortly, we don't want to share strings between iOS and Android, but access some of them in KMM modules.
🤔 1
a
Don't look up Android resource identifiers by string name. It's slow enough that it shouldn't be used in anything more than debug utilities or toy apps. The comment is downplaying the inefficiency.