Forum Xamarin.Android

Resources/Values For Small Device(Portrait Mode) And large Device In (Landscape Mode)

dharamdharam INMember ✭✭

Hi, I am now working on android application which has a support dual language
1.English And 2.Arabic, for multidevices small and large
so issues is that, on small device set the Language From the **_Resources/Values/String.xml_** for English(Default). After Language Change English to Arabic Text is Set From The **_Resources/Values-ar/String.xml_** its work Great With Small Device But There is Problem With Large Device. It's Take Text From the Default Values Folder in Large Device.
please any one know the solution Write Here .. Thanks In Advance


  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    First, the files should be strings.xml not String.xml. Please also notice the "s" at the end of the file name.
    If you have set up your files correctly you have to retrieve them like this GetString(Resource.String.Your_String_Resource_Name). You haven't written it so I just mentioned it here. This is normally all it takes to localize your app.

  • dharamdharam INMember ✭✭

    Hi,@Sebastian, thanks for reply, the above trick is i used in my code , but i think there is problem with devices "dp"or orientation mode because of string.xml is work for mobile device and same activity or class is open with large device ,text come from the default string.xml file in Arabic language

    string sample= Resources.GetString(Resource.String.txt_smaple);
    which text is proper on mobile but there is problem with 10 inch device( i am using Nexus 10) .
    there is any device setting issues or Any Other ??

Sign In or Register to comment.