I have a problem with localizing Zendesk to french. You can see in the below screenshot the word Contacteznous which is not the correct one.
This is not the only word that is incorrect, there are some english words which are not translated at all. I think that based on the language, the appropriate words should be taken from values-fr file in Zendesk library package. The correct word sits there but is not used as you can see from the screenshot.
The code I use for setting up Zendesk is:
public void initZenDesk() {
ZendeskConfig.INSTANCE.setDeviceLocale(Locale.FRANCE);
ZendeskConfig.INSTANCE.init(getActivity(), Constant.ZenDesk_Support_Site, Constant.ZenDesk_ApplicationId, Constant.ZenDesk_Auth_CLientId,
new ZendeskCallback<String>() {
@Override
public void onSuccess(String s) {
Identity identity = new AnonymousIdentity.Builder()
.withNameIdentifier(globals.getUserDetails().get(Constant.MM_UserName))
.withEmailIdentifier(globals.getUserDetails().get(Constant.MM_Email))
.withExternalIdentifier(globals.getUserDetails().get(Constant.MM_UserId))
.build();
ZendeskConfig.INSTANCE.setIdentity(identity);
ZendeskConfig.INSTANCE.setContactConfiguration(new BaseZendeskFeedbackConfiguration() {
@Override
public String getRequestSubject() {
return "Support request";
}
});
new SupportActivity.Builder().show(getActivity());
}
@Override
public void onError(ErrorResponse errorResponse) {
Toast.makeText(getActivity(), errorResponse.getReason() + errorResponse.getResponseBody(), Toast.LENGTH_SHORT).show();
}
});
}
I cannot understand what I am doing wrong, I followed the steps from the official Zendesk webpage. Everything is properly set in the admin back office as well. What am I missing guys?
The missing hyphen is a subtle bug in our translation file, thanks for pointing it out! It will be fixed in our next release.
The hyphen you see in the strings.xml file is a soft hyphen, U+00AD
(see https://en.wikipedia.org/wiki/Soft_hyphen), instead of a regular hyphen, U+2010
. As such, it is not displaying in this case, because the text is not being broken over multiple lines.
As a workaround in the meantime, you can override the contact_fragment_title
in your app, making sure to use a real hyphen character (or a space, or whatever you prefer).