Amending Translation Values in CRM 2011 Outside of the Translation Files - localization

I have received a requirement to amend the translations of the 'Add new..' and 'Add existing..' buttons in French. A typical default button is shown below:
The desired new translations are essentially to remove the gender neutrality (if my rather poor school French is correct!). So rather than 'Ajouter un(e)' we have 'Ajouter un'.
Unfortunately these button labels are not included in the standard translations file (Settings -> Customisations -> Export Translations).
Are there any other options available? Given the nature of the requirement, I am happy to consider pretty much any kind of hack. CRM must be generating these values from somewhere, any ideas where they are hidden?
Note: I profoundly disagree with this requirement for fairly obvious reasons and I am sure most people reading this question will as well. However, requirements are what they are and sometimes customers/clients just will not budge. This is one of those cases.

You can define the labels for CRM Ribbon controls. See Use Localized Labels with Ribbons.
In order to make this work, you need to export the ribbon definitions and identify where these controls are defined.
You should be able to define a CustomAction to override the definition of the existing control but include the label text you want to have instead of the default label text. See Define Custom Actions to Modify the Ribbon.
If you are already experienced with customizing the ribbon this shouldn't be too hard, but there is a signifcant learning curve when it comes to customizing the ribbon.

Related

Sets of English Strings combined with Localization that supports UIStoryboard

I have an app that is used to track/manage livestock. It currently supports one species, Sheep. We want to begin supporting multiple different species, like Goats, and Cattle. My first thought was to create something similar to NSLocalizedString(text, comment) like SpeciesString(text, species, comment) which would take the English string and the species name and translate the Sheep term Ram to the Cattle term Bull. And internal to that, I could use NSLocalizedString() to then further translate that to the proper language so that in the future I could support multiple languages as well.
I see that I can pass a tableName to NSLocalizedString() so that it will use a different file other than Localizeable.strings and that would allow me to programmatically pull values from a Spanish language file that is focused on Cattle instead of Sheep (something like Localizeable-sheep.strings and Localizeable-cattle.strings), but that won't help me with all of the text that is in the storyboard.
I know that there is built-in support for localization with the storyboard, but the problem I'm having is that when the text comes to my code, for example in viewDidLoad, it will already have been translated to the other language, for example Spanish. I would prefer to find a way to make the text in my views already have the right Language+Species combination by the time it gets to my code. But even if I did rely on programmatically swapping out the strings to use the right Species, the English will already been changed to Spanish and I'll get Carnero instead of Ram and if I try to pass that through to my SpeciesString() it won't match my underlying data, because my underlying data is keying off of the English version of the text.
Is there a way to create a custom language? I've seen this code that is used to change the localization language on the fly, and it works for swapping between en and es, but I can't create my own fake languages like en-sheep and es-sheep.
Is there either:
a) a way to create my own custom language so that the localization system will just pick my correct Language+Species combination?
or
b) a way to tell the Storyboard which table name/filename to pull strings from? So that instead of just having a strings file for my Main.storyboard be called es.lproj/Main.strings but I could instead have
es.lproj/Main-sheep.strings and es.lproj/Main-cattle.strings?
I think my inability to get my "custom language" to work was just an accidental oversight. I created an es-sheep.lproj/Main.strings and used the other SO post to programmatically set my language to es-sheep and it didn't seem to work...
... but it turned out that I had created those directories and files, but forgotten to add them to the project. Once I manually added them to the project, it started working and I was able to use my custom localizations.

How to translate non-page content in Kentico

We recently upgraded our Kentico 8.2 instance to 9.0 and are now focusing on localizing our site into two additional cultures. The textual content of our site is primarily stored in one of three places:
Editable regions
Text fields in custom page types
Custom tables
We're using the Kentico EMS license and would like to leverage the built-in Translation Services app in order to translate content in each of these locations, however it appears that it only supports with content within editable regions. I know Kentico has an input control for translating text boxes but it forces the content editor to create a distinct resource key for it; we simply have so much content I'm concerned this will get out of control for editors.
Additionally, we had considered migrating some of our content into pages but they don't logically fit there, and there are some complex relationships that would cause duplicate content so I'd really prefer to keep the content where it is. The other thought I had was to build either a custom module or custom form control to do some dirty work under the covers but didn't want to reinvent the wheel if there was already a known approach.
Is there a Kentico recommended approach, or workaround, to managing content translations within custom tables and page type fields?
You can use Translation in Kentico to translate page type fields and send them for translation. Check this documentation page for an example. It can be more complex at first, but it should do the trick for you. I have just tested creating a simple translation request for my page type and the resulting XLF file contained all page type fields.
For custom tables I will have to dissapoint you because custom tables in Kentico are not culture specific. If performance is important for you the best way to create translations is to add CultureCode field to your table in order to specify which culture the item is for.
For example you can have table with columns: ItemID, Text, CultureCode
And then the data would look like:
1, Dog, en-US
2, Hund, ge-GE
3, Pes, cs-CZ
If you would want to go even step further I would recommend to create this not as a custom table, but as a Custom class which will sit inside a custom module for which you can create your own interface which would allow editors to easily create all culture versions for the items.
For the custom page types and custom tables, you can change those text fields to localized text fields at the field definition and it will allow you to enter different values per language without a resource key. This is the best route IMHO for page types and custom table translation. Although this still does not allow for "automatic" or built-in translation.
I am not sure what do you mean by content translation in page type fields - there is support for translating page type fields. You can find example on sample site in Kentico installation. (The site is called DancingGoat - see image example for page type field localization in english and spanish language).

Composite C1 console edit button available for non translated data

We are using Composite C1 version 2.1.1 with static C# data. This data is localizable (ILocalizedControlled) and is shown on top of the data tree (TreeDefinitions\GlobalData.xml). Users are able to translate the data to their selected language, but somehow it is possible to "Edit" the data before translating it. This means that when they do it wrong (i.e. in stead of first choosing "Translate Data" and then "Edit", choose "Edit" directly) translated data will appear on the source language site. Which is very annoying because the source data is lost as well.
Seems that when choosing a data item only "Translate Data" should be possible, but now four buttons are shown (Translate Data, Edit, Add and Delete). So I would like to be able to change this behavior, but can't seem to find where or how to influence this.
Hope anyone can help.
somehow it is possible to "Edit" the data before translating it.
This is because in your tree definition (TreeDefinitions\GlobalData.xml), you explicitly use EditDataAction, which does what it is supposed to do: allow editing an item using the standard edit workflow.
I suggest that instead, you create and use a custom workflow for editing items, which might have a logic to allow editing only if the data item is translated in the current language.
I don't have a ready-to-use code for that but you can check samples for custom workflows here.
Also, in the upcoming version 4.1 of Composite C1 (currently beta), you don't need to create tree definitions for static data types. They are available in the C1 Console out of the box. And you can add, edit and delete items of these types there, and the Translation feature on localized types works as expected.
Compare:
The item exposed via a Tree Definition (the issue you mentioned)
And the same item available under "Static Datatypes" (a new feature in 4.1)

how to design a tag system for a localized website?

Let say i have a basic tagging system (for a craiglists "clone") such as:
Tag (id, tagname)
ad(id, title, body)
adTag(tag_id, article_id)
This will fit for a non-localized website but what will be the correct aproach for a website that is used by people speaking diferent languages?
Users probably will post ads in diferent languages in one same local area, so, maybe i should make some kind of synonym system that considers "job" and "trabajo" the same tag? But, what about users that only want to see ads in one language?
Catering for tags for all the different languages is probably just going to be trouble. Going with the idea where you treat all variations of a tag as one single type will probably simplify a lot of the issues (so you don't need to keep track of language-tag mappings on the fly, just do the conversion once and be done with it). If the user needs to search by language later on, then just stick a meta-tag for that particular language on when you save the post.
Of course, that leaves the question of what happens when a user uses tags from multiple languages... but I suppose you can always enforce one single language or something.
I can think of two possible solutions:
Add language field: Tag (id, tagname, lang) where you can specify the language for the tag
Change Tag to Tag(id) and use separate table for tag translations tagTranslations(tag_id, lang, tagname)
Note: But I think this is only needed, if your articles have multiple translations.

Localization of Reporting Services-Reports (.rdl / .rdlc-Files)

i need to localize a Reporting Services-report (.rdlc) and i would like to do it using a ressource-file (.resx).
I found pages like this and that and they use custom code to achieve their target.
But pages like Setting the Report Language Parameter in a URL give me the impression that localization in reports is possible without custom code.
So, it is possible to localize a Reporting Services-report without custom code ?
If so, is there a tutorial that explains how it's done?
What in the report do you want to localize?
values from the database? Those should be retrieved from the database in the appropriate language already
fixed labels and textboxes on the report? I have not yet seen any compelling way to doing this - you can either have
one report "skeleton" / template per language (and pick the one you need)
if the number of elements is manageable, define report parameters which you can set from the calling code, to set the labels and texts
use some custom .NET extension for handling localization
It's not really an awfully pretty picture, indeed - I'd be most interested in better solutions myself! (I typically need to support 3-4 languages for any report - and I'm using only server-based .RDL files, no .RDLC, so any localization that depends on client-side resource files is not usable in my case)
I would add one method when it comes to labels and textboxes:
Create a placeholder element within the textbox and use Expression field to
use a Switch clause , switching on the Language parameter.
It's not superpretty, but also works pretty well for 3-4 languages
I am passing parameters to the report for labels etc, and after adding the parameters to the report (using the menu option Report -> Parameters in VS2008) you can then use the values of these parameters to localise the labels. This is workiiing well enough, although it would be nicer to be abkle to refer to resource keys immediately from your form labels etc.

Resources