Posted on 19/02/2014 20:17:04
You cannot translate group names using built-in functionality, but you can add a piece of JavaScript to translate group names using @Translate tags in your template:
<script>(function() {
var i, element,
translation = {
'Accoglienza/Alloggio': '<!--@Translate(Accoglienza_Alloggio, "Accoglienza/Alloggio")-->',
'Aspirantato': '<!--@Translate(Aspirantato, "Aspirantato")-->',
// ... more group names
},
elements = document.querySelectorAll('button[data-group-id], li[data-group-id] .group');
for (i = 0; element = elements[i]; i++) {
var text = element.innerHTML.replace(/^\s+/, '').replace(/\s+$/, '');
if (translation[text]) {
element.innerHTML = translation[text];
}
}
}())</script>
It's a bit of a hack, but it's the best we can do.