Composite C1 console edit button available for non translated data - localization

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)

Related

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).

Directly modify a specific item in a TKinter listbox?

This is one of those just-making-sure-I-didn't-miss-anything posts.
I have a TKinter GUI in Python 2.7.3 that includes a listbox, and there are circumstances where I'd like to directly modify the text of a specific item at a known index. I've scoured the documents and there's no lb.itemset() method or anything like it. As best I can tell I have two options, either of which would work but just seem kind of klunky to me:
lb.delete() the old item and lb.insert() the new value for it at the same index (including a step to re-select the new value if the old deleted one happened to be selected).
Create a listvariable for the listbox, then use get() and set() on it -- with a pile of replace/split/join acrobatics in between to handle the differing string formats involved.
Is there some simpler, more direct way to do it that I'm missing? Or have I turned up all the available options?
Assuming from silence that there's nothing I missed. I went with option 2 -- the acrobatics weren't quite as complex as I'd thought. I just created a behind-the-scenes list wrapped up in a class; every time I update the list, the class syncs up the content of the listbox by doing a ' '.join on the list then setting the listbox's listvariable to the resulting string.

Multi language, intelligent link conversion

I'm pretty new to Umbraco, so my question may turn out to be pretty simple, but I wasn't able to find any simple guide on it online.
I'm building a simple website with one domain and structure as follows
Content
- en
-- products
-- contacts
- cs
-- produkty
-- kontakty
and so on. My first question is: since I want to accomplish some nice results in SEO, I need to (i) assign meta language to contents of "en" and "cs" nodes, as well as some keywords. How should I do this?
Second: Say that in the future, I decide to add a new language, ex. Russian. So what I would need to do is to make a copy of the "en" node and its contents while the links included in the newly created copy should be rewritten to point at the copy and not the original (original would be /en/anotherpage, which should be rewritten to /ru/anotherpage). Is this possible?
Thanks,
Ondrej
You could build the content structure as a single root node and then have multiple Language homepage nodes directly beneath the content root.
To assign a language, you could create a custom datatype that simply displays all the .Net cultures, e.g. en-GB, fr-FR etc. Include that data type as a field on the language homepage document type and then output this value in the markup on the homepage and each descendant.
In the Language homepage document type, you can add a textstring property called 'umbracoUrlName'. You can then use this property to override the Url name. E.g. So you could call the page www.domain.com/en/ instead of www.domain.com/en/english-home/
With regards to duplicating the site at a later date, this is a difficult one. If the links are created using data types like the media picker and uComponent's multi node tree picker, then you will have no option but to inherit the links from the copied branch. However, if the links are created dynamically in the Razor or XSLT, then you should be able to make the links relative to the Language homepage or the current page. E.g. in XSLT getting the children of the parent language homepage would be something like $currentPage/ancestors-or-self::* [#level = '2']/child::* . In other words you can avoid hard coding links by using a clever bit of relative traversal.
This should give you a good start on creating multilingual sites in Umbraco
http://our.umbraco.org/wiki/how-tos/running-multi-lingual-sites-under-a-single-domain
If you was to create a Russian version in the future you would do exactly what you have mentioned above, its that easy.
To set the language meta data I would store this in a property on the langauge root node eg: /en/ to get the language page property from any page:
var langNode = new Node(int.Parse(node.Path.Split(',')[1]));
langNode.GetProperty("languageCode");
As for copying the English version to the Russian version and fixing all the links, I'm not aware of anything in umbraco to help you with this, you could write something yourself to find all the links and node references and fix them. you could use the relations API to keep track of what was copied from where to where. You'll need to be aware that you could end up copying nodes more than once.
If you don't have too much data, manually fixing links may be quicker.

Amending Translation Values in CRM 2011 Outside of the Translation Files

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.

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