예제 #1
0
파일: Intl.cs 프로젝트: lsmolic/hangoutsrc
        private List <locale_data> GetTranslations(string locale, bool all, bool isAsync, GetTranslationsCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string> {
                { "method", "facebook.intl.getTranslations" }
            };

            Utilities.AddOptionalParameter(parameterList, "locale", locale);
            Utilities.AddParameter(parameterList, "all", all);

            if (isAsync)
            {
                SendRequestAsync <intl_getTranslations_response, List <locale_data> >(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <List <locale_data> >(callback), state);
                return(null);
            }

            return(SendRequest <intl_getTranslations_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)).locale_data);
        }
예제 #2
0
파일: Intl.cs 프로젝트: lsmolic/hangoutsrc
 /// <summary>
 /// Returns an array of strings from your application that you submitted for translation. This call returns the original native strings, the best (or all) translations of native strings into a given locale, whether the string has been approved, and by whom.
 /// By default, the translation for a given string that gets returned is the current best translation, as it appears in the Facebook Translations application database. The translation was approved either automatically by the Translations application or was manually approved by you, another developer of your application, or a translator with whom you have a contract.
 /// If there is no such translation, then the native string doesn't get returned.
 /// You do not have to pass a session key with this method. However, you must include your application secret.
 /// </summary>
 /// <param name="locale">The locale from where you are retrieving the translated strings. To return translated strings from every locale where someone has translated your application, specify all for locale (however, this is not recommended for performance reasons). Locales are of the format ll_CC, where ll is a two-letter language code (in lowercase), and CC is a two-letter country code (in uppercase). For a list of locales Facebook supports, see Facebook Locales. If the default is used, then only the native strings get returned. (Default value is en_US.) </param>
 /// <param name="all">When true, this call returns every translation for every native string. When false, this call returns the best translation for every native string. (Default value is false.) </param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 public void GetTranslationsAsync(string locale, bool all, GetTranslationsCallback callback, Object state)
 {
     GetTranslations(locale, all, true, callback, state);
 }