Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I am having problems to understand how can I create the translated version of an existing article through Apex. I have the KnowledgeArticleId but I don't know what's the method to create lets say a 'french' version of the master article.

I was trying the following:

//Create a draft from online version
string draftKbId = KbManagement.PublishingService.editOnlineArticle ('kA7W00000004DX8KAM', false);

List<Documentation__kav> KBAtoPublish = new List<Documentation__kav>([Select Id,KnowledgeArticleId, TopicId__c, Title, UrlName, content__c from Documentation__kav
                  WHERE Id=: draftKbId]);

//Modify Draft values

KBAtoPublish[0].Content__c='le content';
KBAtoPublish[0].Title='french version';
KBAtoPublish[0].UrlName='frenchURL-example';
KBAtoPublish[0].Language='fr';

Update KBAtoPublish[0];

I get the message "Language is not writeable"

Any help will be appreciated!

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Alright, so the solution is to use the method to create a new draft translation which then can be modified and set as completed.

string DraftTranslation= KbManagement.PublishingService.submitForTranslation(masterArticleId, language, assigneeId, dueDate);
share|improve this answer
    
My answer too pointed you in same directions.anyways not a problem.Just like to inform that there is an appexchange product Cloudwords AppExchange .This app auto translates –  Mohith Kumar Feb 13 '13 at 18:07
    
I didn't accept your answer because it suggested this wasn't possible via API, then I ended up discovering how to do it. I do appreciate your intention to help anyway. Also thanks for the suggestion on the app :) –  PepeFloyd Feb 14 '13 at 11:05
    
what i meant was that translation is not possible automatically as there is no automation to convert words into other languages .Thanks .May be i have to rethink on how i need to present my answer to make it readable –  Mohith Kumar Feb 14 '13 at 11:12
add comment

http://login.salesforce.com/help/doc/en/knowledge_translation_overview.htm

I would suggest you to go through the above link.Its very clear that this is done manually inside the salesforce or through exporting English version and then after receiving the French Version or any other language supported we import it to have the article translated .

There is no automatic button or an API where you can directly translate .

The API are build according to the above link

1)submitForTranslation
2)editPublishedTranslation
3)completeTranslation

The above methods in Publishing service class can be used in order to achieve translation.Note again that it has to be done manually or exporting and then importing translated article .Also note to publish the article once translation is over.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.