Answered by:
CRM 2011 - Multiple Languages and HTML Web Resources used for Labels

Question
-
We have a CRM 2011 instance set up and we are supporting users for both English and Spanish languages. There are some instances where were are having to use HTML web resources for text on forms because the label length for fields in CRM isn't long enough out of the box. The method follows this article:
http://blogs.infinite-x.net/2011/05/20/adding-form-labels-using-html-web-resources/comment-page-1/
I have imported all the translations for the Spanish languages, but these web resources are of course still in English. My questions are
1. Do I need to create a Spanish HTML web resource for every HTML web resource that we have in English?
2. Is there are way to hide the English web resources when the person is viewing CRM in Spanish and vice versa?
Thanks!
Friday, February 22, 2013 2:53 PM
Answers
-
Create your own XML Language Files. You can use User.Lcid or Org.Lcid to load the correct lang. file or default to Org language. More Infos http://msdn.microsoft.com/en-us/library/hh670609.aspx
Carsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist, MVP für Microsoft Dynamics CRM
- Proposed as answer by Andrii ButenkoMVP, Moderator Sunday, February 24, 2013 5:28 PM
- Marked as answer by wikky2007 Monday, February 25, 2013 6:34 PM
Friday, February 22, 2013 11:01 PM -
Hi,
I would recommend that you simply try and shorten your labels so that they fit in the standard label fields. As soon as you go down this custom label approach for multi language solutions, your total cost of ownership is going to go up since many other areas of the system will be impacted.
In general though, where you have webresources, it is best to make each webresource dynamically change it's label using javascript. You should use
Xrm.Page.context.getUserLcid()
to find the language code if the user, and then either do a switch statement to select the text, or you want to be more sophisticated look up the correct language translation from a centralised xml/javascript webresource.
hth
Scott Durow
Read my blog: www.develop1.net/publicFollow Me on Twitter
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"- Proposed as answer by Andrii ButenkoMVP, Moderator Sunday, February 24, 2013 5:28 PM
- Marked as answer by wikky2007 Monday, February 25, 2013 6:35 PM
Saturday, February 23, 2013 9:40 AMAnswerer
All replies
-
Create your own XML Language Files. You can use User.Lcid or Org.Lcid to load the correct lang. file or default to Org language. More Infos http://msdn.microsoft.com/en-us/library/hh670609.aspx
Carsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist, MVP für Microsoft Dynamics CRM
- Proposed as answer by Andrii ButenkoMVP, Moderator Sunday, February 24, 2013 5:28 PM
- Marked as answer by wikky2007 Monday, February 25, 2013 6:34 PM
Friday, February 22, 2013 11:01 PM -
Hi,
I would recommend that you simply try and shorten your labels so that they fit in the standard label fields. As soon as you go down this custom label approach for multi language solutions, your total cost of ownership is going to go up since many other areas of the system will be impacted.
In general though, where you have webresources, it is best to make each webresource dynamically change it's label using javascript. You should use
Xrm.Page.context.getUserLcid()
to find the language code if the user, and then either do a switch statement to select the text, or you want to be more sophisticated look up the correct language translation from a centralised xml/javascript webresource.
hth
Scott Durow
Read my blog: www.develop1.net/publicFollow Me on Twitter
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"- Proposed as answer by Andrii ButenkoMVP, Moderator Sunday, February 24, 2013 5:28 PM
- Marked as answer by wikky2007 Monday, February 25, 2013 6:35 PM
Saturday, February 23, 2013 9:40 AMAnswerer -
Carsten, can you show me a schema file of what the XML Language File looks like?
- Edited by wikky2007 Monday, February 25, 2013 8:05 PM
Monday, February 25, 2013 6:41 PM