0

I am working on android app in which i am supporting 7 Indian languages. when i select language to Hindi and perform Facebook post then its not showing Hindi text(all blank) on Facebook wall, but when i did it with English text then its showing all text.

so anyone guide me how can i show post in another languages in Facebook wall.

below is the code which is used by me

                .setMessage("राष्ट्रीय")
                .setName("Android Application.")
                .setCaption("One App with 7 language support.")
                .setDescription(
                        "This is dummy app")
                .setPicture(
                        "http://xxxxx.xxxxx.xxx/img/cm/mainhp/logo.gif")
                .setLink("https://www.google.com").build();
        mSimpleFacebook.publish(feed, onPublishListener);

after posting this i am getting message as a blank in facebook wall page

varun
  • 768
  • 7
  • 19
  • see this link http://stackoverflow.com/questions/8636714/languge-support-for-gujrati-and-hindi-in-android – Randroid Apr 23 '14 at 09:23

1 Answers1

0

After 3 hour find solution by my self

public static void updateLanguage(Context context, String code)
    {
        Locale locale = new Locale(code);
        Locale.setDefault(locale);
        Configuration config = new Configuration();
        config.locale = locale;
        context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics());
    }

and the key point to call in onCreate is

Utils.updateLanguage(getApplicationContext(), "hi");

where hi is the language code for Hindi.

varun
  • 768
  • 7
  • 19