Multilingual solution - dynamics-crm-2011

Two questions, hopefully with similar answers.
I'll be releasing a JavaScript package in my solution where the error messages are to be displayed. The problems is that I'll be targeting German, English and French. Possibly, also a fourth language TBD. What would be the nicest way to resolve this?
The label names should definitely be localized. Is there a built-in approach to that in CRM 2011? Like a resource table or something like that?
My current solution for (1) is to keep an extra web resource with the strings and distributing a different file for each language. I may rebuild it and distribute all the languages at once and only use a parameter, possibly settable from the GUI if I create a settings-entity. A bit cumbersome.
My current solution for (2) involves a lot of praying and a divine act of some sort. :)

To determine current CRM user language dynamically from Javascript you can use window.USER_LANGUAGE_CODE (this variable exists on all CRM pages) - for example it will be equal 1033 for English. Than based on that info, you can pick needed string resources from your file.
Also in forms context there are two predefined functions, which return current Organization language code and current User language code: Xrm.Page.context.getOrgLcid() and
Xrm.Page.context.getUserLcid() .
If you are talking about custom entities and fields, you can easily add localized display names for them via your solution. You need to edit customizations.xml file from your unzipped solution. For each attribute there you will find such XML containing display names:
<displaynames>
<displayname description="Created By" languagecode="1033" />
</displaynames>
You can just add new display names for each language you need there.
P.S. If someone interested in different aspects of multilangual support for Dynamics CRM 2011 solutions, I strongly recommend to review this page, also here and here is a very helpful reading.

Related

Kentcio v9 Smart Search Dialog with Results search mode localization

How can i localize the drop down option for the search mode? I did some digging and was able to adjust the localization for the search form labels but i'm at loss here.
The CMS Module SearchDialog.ascx call the drop down list here, but i can't see where the values come from.
<cms:CMSDropDownList runat="server" ID="drpSearchMode" CssClass="DropDownField" />
Go to the localization App and create resource strings for
"srch.dialog.AllWords"
"srch.dialog.AnyWord"
"srch.dialog.anywordorsynonyms"
"srch.dialog.ExactPhrase"
Believe those are the 4 you need.
I couldn't find official documentation that helps much with this, though there have been articles in the past on older versions. However, one trick I've used previously is to look in the ~/CMSResources/cms.resx file, find the localized string there, and add a new one with the same key to the Localization module in Kentico. That is, add a new resource string in Kentico with the same key (the naming will be different depending on your version of Kentico).
Here's the docs discussing setting up a multilingual interface: https://docs.kentico.com/display/K9/Setting+up+a+multilingual+user+interface
And here's a screenshot of the resx file:
So in your case I'd create a new resource string within Kentico called "srch.dialog.allwords" as an example and that should overwrite and take priority over whatever is in the .resx file, plus you can manage it via the Kentico admin. There may be a quicker or more reliable way to view the list of default resource strings but in my recent installs of Kentico, the list is hidden from the admin interface.
Alternatively, of course, you could manage the resource strings via various .resx files as in the documentation, but I try to manage as much of these pieces via Kentico as possible for convenience.

Search a specific search of a journal article based on the user type

I have this requirement:
We have a journalarticle and we wish to have sections which have content for internal and external users for the application.
We are able to hide the content from rendering by implementing custom template on web content display and using a simple custom-field for a user which helps us to classify it.
Having said that when we search something as an external user, the search portlet is able to fetch an article where the search text is a part of internal user content, and due to the above mentioned template the content is not visible.
In short, from the user's perspective the resultant article does not match the searched term.
I wish to seek some pointer to check whether there is a mechanism to ensure that when an external user searches something then we only search the dynamic-element of the doc which matches the user type?
We have thousands of such articles and create multiple copy of the same article does not seems viable solution.. so any pointers would be a great help.
Liferay version : 6.2 GA4 CE
Thanks!
AJ
First of all: Not finding a search term in a document can be a sign of good working synonym resolution in the search engine. It's questionable if this behaviour is always wrong or only in this particular case. Remember google bombs?
That being said, I believe that this architecture of half-visible documents is flawed from the beginning. Ideally I'd suggest to change it, for example by splitting the information to two articles, so that you can use the standard permissions to resolve. If you link both, you can determine how/which article or template to use. It's not an ideal solution, but might be a workaround.
Another workaround might be to change Liferay's indexer component and index two different versions of the article, with two different permissions. Of course, you'll have to change the search side as well, so that you'll find each article at most once, even if it's now twice in the search engine.
Again - not ideal, but might be the quickest fix that you can get right now without changing the underlying architecture. However, to change the underlying architecture is my actual recommendation.

Changing the text on a label in different languages

Not really that easy question here. :)
A customer has a field ownerid that is used as the lookup to a salesperson. I've changed the text of the label from Owner to Hazaa and I can see it take effect.
The problem is that Hazaa only displays in the English version (the base language of the installtion), while the language that is used for the users is Swedish. The users with Swedish language selected see the default translation, while they'd like to see Hazaa instead.
How can this be done?!
I could, perhaps, play around with exporting the language for translation, editing it and, then, importing back. However, that's a little, tiny, wimsy bit overkill for changing a single label. However, I suspect that only a few entities will require hazaa-fication of the ownerid field, while the rest is supposed to be left as is.
The supported way to translate the label is using the translation process (an example can be found here)
Maybe you can consider to create an unmanaged solution that contains only that entity, in order to export only the necessary labels.
There is also a tool recently released by Tanguy Touzard in his toolbox, I didn't use it yet, but you can find more information here:
http://mscrmtools.blogspot.com/2013/08/new-xrmtoolbox-plugin-easy-translator.html

Export list of Sitecore items as Excel (or other formats)

I noticed that sitecore has the option of exporting users in an Excel format.
I need to have similar functionality for exporting 'participations', (a users can enlist to take part in an 'event', and if their entry is approved via a sitecore workflow, a 'participation' item is created in the content tree)
Since mostly everything in Sitecore is in essence based on items, and I want to export items to Excel, my question is - what are some of the best ways of doing this?
Questions:
Is there a way to re-use this functionality for regular items?
Would it be a good idea to create a custom admin page (any tips on doing this?) which has some custom code that reads the items from the database using the API?
are there sitecore plugins/shared source projects that can help me achieve this?
Or does anyone have a better idea? - would it be better to just store the participations in SQL? I'm mostly doing it this way because I want to make use of the 'free' functionality offers, for example workflow, but if that leads to me using anti-patterns please shoot me ;)
Link is different now: https://marketplace.sitecore.net/en/Modules/Advanced_System_Reporter.aspx
P.S. Couldn't leave a comment to original answer as I don't have enough reputation. Oh well :)
Found a most excellent shared source module which does exactly this (and much more)!
Basically it allows you to configure (and easily extend, if you need to) any kind of table based report on 'items'.
The report module shows up as an application in the sitecore menu (like the user manager tool) and comes with features such as xml,csv, xls export. It's also really easy to set up, once you get the hang of it.
http://trac.sitecore.net/AdvancedSystemReporter

Rename a SharePoint list content type

I need to rename the content type I created a couple months back and
have been using for a document library, assigned site columns to, created
document library views for and have added workflow to.
It appears that this is quite simple to do under the site settings for content type. However it is often the simple, apparently straight forward things that cause unforeseen
issues.
Does anyone know of any gotchas when it comes to renaming a content type?
Here's some guidelines, the main statement though is:
The general guideline for evolving the content type IA is to never change or rename content types or their aspects, make new ones and hide the old ones.
You can set the SPContentType.Name property and then call SPContentType.Update(). Considering the guidelines linked to in Colin's answer you should test this in a non-production environment first.

Resources