Sorry, I've just realized I typed "sites" but I meant "languages of the site".
CE has only 1 site.
For the moment, I've managed with a query:
[code]public List<String> getLocales() {
List<String> locales = new LinkedList<String>();
try {
final Node node =
SessionUtil.getNode(RepositoryConstants.CONFIG, "/server/i18n/content/locales");
NodeIterator nodeIt = node.getNodes();
while (nodeIt.hasNext()) {
Node next = nodeIt.nextNode();
if (PropertyUtil.getBoolean(next, "enabled", false)) {
locales.add(PropertyUtil.getString(next,
"language", next.getName()));
}
}
} catch (RepositoryException e) {
log.error("{} caught: {}", e.getClass().getName(),
e.getMessage());
}
return locales;
}[/code]
No apis for that in freemarker?
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=8ad12c31-b92a-4cbe-a4ca-ac2598588244
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------