How can I change the language which the com.facebook.widget's use for display the labels?
I am using the com.facebook.widget.LoginButton and the system language of my Android device is set to german but however the LoginButton displays the text "Log in with Facebook" instead of "Mit Facebook anmelden". I also checked the Localize settings of my app on the Facebook developer page which is default german.
Asked
Active
Viewed 3,402 times
5
-
1This might be useful: http://stackoverflow.com/questions/16314651/customize-android-facebook-login-button – Andre Amaral Braga Jun 06 '14 at 15:03
1 Answers
9
It does not include German language localization.
In your layout, set the custom login_text attribute...
<com.facebook.widget.LoginButton
(usual attributes removed)
loginView:login_text="Whatever text you want" />
Assuming you set the loginView namespace on your root element...
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:loginView="http://schemas.android.com/apk/res-auto"
(usual attributes removed)... >
Following the same example to include logout text it will be:
<com.facebook.widget.LoginButton
(usual attributes removed)
loginView:login_text="Whatever text you want"
loginView:logout_text="Your logout text" />
moxi
- 1,390
- 20
- 21
Greg Ennis
- 14,917
- 2
- 69
- 74
-
-
Are there also attributes for setting the text of the logout dialog which is also completely in english? How are they called? I cannot find any references... – Jun 13 '14 at 23:46
-
3`AGPBI: {"kind":"error","text":"No resource identifier found for attribute \u0027login_text\u0027 in package \u0027com.etutore.android\u0027","sources":[{"file":"/Users/cassio/Workspace/etutore-android-student/app/src/main/res/layout/activity_login.xml","position":{"startLine":51}}],"original":""}` FAILURE: Build failed with an exception. – Cassio Landim Jun 07 '15 at 16:22