Jack Chen
unread,Feb 3, 2012, 1:13:10 AM2/3/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi All,
I'd like to delete all translation of starteam customization field
including system field. But there are always 4 locations (france,
german, japan, portugal) for system field. Do you know how to delete
the translation for each item. It seems the API does not work.
//delete item translation by java
EnumeratedValue[] aEnumeratedValues =
((EnumeratedProperty)property).getAllValues();
for (EnumeratedValue enumeratedValue : aEnumeratedValues) {
Translations itemTranslations =
enumeratedValue.getDisplayNameTranslations();
String[] aStrings = itemTranslations.getLocaleNames();
String defalutString = itemTranslations.getDefault();
for (String string : aStrings) {
//itemTranslations.setTranslation(string, defalutString); //
does not work
itemTranslations.removeLocale(string); //
does not work
}
property.update();
}
//delete item translation by javascript
var stCol = stColFactory.Create();
//var stTranslation = stTranslationFactory.create('test');
var stEnum = stEnumFactory.CreateLocalized(001,
stTranslation); // is there any API to creat a translation for this
4 locations (france, german, japan, portugal) ?
stCol.Add(stEnum);
if (stProp != null)
var stTranslation = stTranslationFactory.create('test1');
stAdmin.updateEnumeratedField(stProp, true, stTranslation, stCol,
200);