i am trying to get i18n localisation working on an Grails/Groovy enum,
public enum Notification {
GENERIC(0),
CONFIRM_RESERVATION(100),
CONFIRM_ORDER(200),
CONFIRM_PAYMENT(300),
final int id;
private Notification(int id) {
this.id = id
}
String toString() {
id.toString()
}
String getKey() {
name()
}
}
Any hints on how i could achieve that? I tried to put the full classname etc in a localisation but this does noet seem to work
<g:select from="${Notification.values()}" name="notification" valueMessagePrefix="full.path.to.package.Notification"/>