2014-04-23 25 views
0

我正在開發Android應用程序,其中我支持7種印度語言。 當我選擇語言到印地文和執行Facebook發佈,然後它不顯示在Facebook牆上的印地文文本(所有空白),但是當我用英文文本做它然後顯示所有文本。多種語言的Facebook帖子

所以任何人指導我如何顯示在Facebook牆上的另一種語言的文章。

下面

是被

   .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); 

由我自己

+0

看到這個鏈接http://stackoverflow.com/questions/8636714/languge-support-for-gujrati-and-hindi-in-android – Randroid

回答

0

3小時找到解決後,在Facebook塗鴉牆頁面發佈此我得到的消息爲空白後使用我的代碼

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()); 
    } 

以及onCreate調用的關鍵點是

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

其中hi是印地語的語言代碼。