strings in android:label (title) in Android Manifest are not translated

strings in android:label (title) in Android Manifest are not translated



I have several activities declared in Android Manifest with the tag android:label and the correspondent string. For example:


<activity
android:name=".actCheckItemEdit"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/check_item_edition"
android:windowSoftInputMode="stateHidden"
android:theme="@style/AppTheme.ActionBar" />



The thing is that sometimes the title of the activity doesn't change the language when supposed to, but all the other elements do. The same happen to me when I want to query the DB and manually set a 'Select one option...' message as the first item the user sees, i.e.:


public Cursor fetchWhere(String where) throws SQLException

String strSQL = "SELECT " + " -1 AS " + KEY_ROWID + "," + "-1 AS " + KEY_ID + "," + "' "
+ valoresGenerales.appContext.getString(R.string.str_seleccione_centro) + "' AS " + KEY_DESCRIP
+ ", -1 AS " + KEY_ID_V9 + ", 0 AS " + KEY_CC_LATITUD + ", 0 AS " + KEY_CC_LONGITUD;
strSQL += " UNION ";

strSQL += " SELECT " + KEY_ROWID + "," + KEY_ID + "," + KEY_DESCRIP + ", " + KEY_ID_V9 + ", " + KEY_CC_LATITUD
+ ", " + KEY_CC_LONGITUD + " FROM contratos ";

Cursor mCursor = mDb.rawQuery(strSQL, null);
return mCursor;



Do you know why may this happen?
Thank you.





Did u use default title bar for showing title??
– Md.ibrahim khalil
Aug 31 at 15:20





@Md.ibrahimkhalil yes, the title is shown, but not translated
– mantc_sdr
Sep 3 at 7:20




1 Answer
1



Default title bar’s title doesn’t translate.
You need to use custom one





sometimes it does, and sometimes it does not, for this reason I ask...
– mantc_sdr
Sep 3 at 9:34





Some where i have seen it. And also it doesn’t work in my case.
– Md.ibrahim khalil
Sep 3 at 9:51



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)