Use ResourceBundles (or .properties.en, .properties.de, etc.) for L14N at runtime
ansell opened this issue · 2 comments
For multi-lingual ontologies, the user may want the javadoc in one language (or offer all languages in the javadoc?). They may also want the runtime ability to display the most appropriate label to the current user based on their Locale.
When parsing the ontology, we have access to each of the languages, and we could provide these as ResourceBundle classes or .properties files.
There may be a larger effort needed to enable this. We would need to create a new framework for getting labels based on URIs. One way to do this may be to extend org.openrdf.model.Namespace with Namespace.getLabel(URI) to use the current Locale and Namespace.getLabel(URI, Locale) methods to use the default locale. I will propose this for Sesame for 2.8 if it is the easiest way to go, and then regenerate all of the Sesame vocabularies so that they also support it.
Btw, this should not block the release unless it turns out that it is very trivial.
I don't know exactly what could be the use case for such a method. Can you explain this a little bit more in detail? I think we will do the first release as it is, following the principle release early, release often ;)
The use case is to localise applications. We are already processing the ontology to find labels and longer descriptions for URIs. However, we are not exposing these to the application at runtime, so the user would need to go back and do the processing that we are doing again.
The release early and release often policy is a good thing so don't let this hold up future releases either. I also like the principle of keeping scope reasonably well defined so if this oversteps the scope then let me know and I can pursue it elsewhere.