I am trying the understand the internal workings of R.java and localization in Android.I know that the strings are compile time resources and are generated by the apt. I have several questions regarding R.java .
1.If I open the R.java generated file I can see
public final class R {
public static final class string {
public static final int HelloMessage=0x7f05000f;
}
Why is R.String.HelloMessage is int.And if it's static final how the localized version works with the same int as I cannot see any localized version of the variable.
2.How the switching to locales happen.Can someone point me to the android source code.I have browsed the code for android.content.res.AssetManager,com.android .settings.LocalePicker.java but I am not sure how behind the scene R.Java is loading the localized strings.
Thanks