I have a site with multilanguage.
In documents and files I added files with their corresponding version in each language.
I want to get all versions of the selected document.
I did this:
public void GetDocumentLanguageVersions(IEnumerable<Guid> documentsId)
{
var librariesManager = LibrariesManager.GetManager();
List<Document> documents = librariesManager.GetDocuments().Where(document =>documentsId.Contains(document.Id)).ToList();
Document proof = documents.FirstOrDefault();
string[] languages = proof.AvailableLanguages;
var languageData = proof.LanguageData; //In this object I can see the number of languages available for this document but it does not show me the ids
}
Thanks in advanced.
On the attached gist you can get at the Urls of the items my access the Lstring fields using an indexer culture. This is an extension method so usage looks like below:
LibrariesManager manager = LibrariesManager.GetManager(); var document = manager.GetDocuments().FirstOrDefault(doc => doc.Status == ContentLifecycleStatus.Live && doc.Visible); var langUrls = document.GetLanguageUrls();
[View:https://gist.github.com/jonathanread/07ae66b1566cb0df5c7bd4640e999446:550:50]
Thanks a lot bro!
Also check out this documentation for getting the data a little different way. www.progress.com/.../for-developers-query-localized-items