I think you can simply store alphabetically ordered keys from the ResourceBundle and pass it to the ftl template, right?
Regarding the 'index', the default ordering of the keys in Java ResourceBundle is by the presence order in the properties file or repository resource document.
Repository resource bundle document doesn't have index field actually, but the index is just the presence order index of the property value.
Anyway, in properties file (for resource bundle resource or documents), the presence order has an important role like variable interpolations [1].
We support variable interpolation in repository resource bundle documents, which is obviously unrelated to the alphabetical order, but presence order.
Of course, I have to admit that the resource bundle document editor seems a bit confusing if end users need to use variable interpolation based on the index. I believe we need to improve the user experience there (e.g, at least change ordering by clicking on column).
HTH,
Woonsan