diff --git a/doc/sphinx-guides/source/installation/config.rst b/doc/sphinx-guides/source/installation/config.rst index f114a7403b7..6b5248c902e 100644 --- a/doc/sphinx-guides/source/installation/config.rst +++ b/doc/sphinx-guides/source/installation/config.rst @@ -573,13 +573,10 @@ The presence of the :ref:`:Languages` database setting adds a dropdown in the he Configuring the "lang" Directory ++++++++++++++++++++++++++++++++ -Translations for Dataverse are stored in "properties" files in a directory on disk (e.g. ``/home/glassfish/langBundles``) that you specify with the :ref:`dataverse.lang.directory` ``dataverse.lang.directory`` JVM option, like this: +Translations for Dataverse are stored in "properties" files in a directory on disk (e.g. ``/glassfish/domains//lib/classes``) that you specify with the :ref:`dataverse.lang.directory` ``dataverse.lang.directory`` JVM option, like this: -``./asadmin create-jvm-options '-Ddataverse.lang.directory=/home/glassfish/langBundles'`` +``./asadmin create-jvm-options '-Ddataverse.lang.directory=/glassfish/domains//lib/classes'`` -Go ahead and create the directory you specified. - -``mkdir /home/glassfish/langBundles`` Creating a languages.zip File +++++++++++++++++++++++++++++ @@ -1045,7 +1042,7 @@ dataverse.lang.directory This JVM option is used to configure the path where all the language specific property files are to be stored. If this option is set then the English property file must be present in the path along with any other language property file. You can download language property files from https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs -``./asadmin create-jvm-options '-Ddataverse.lang.directory=PATH_LOCATION_HERE'`` +``./asadmin create-jvm-options '-Ddataverse.lang.directory=/glassfish/domains//lib/classes'`` If this value is not set, by default, a Dataverse installation will read the English language property files from the Java Application. diff --git a/src/main/java/edu/harvard/iq/dataverse/util/BundleUtil.java b/src/main/java/edu/harvard/iq/dataverse/util/BundleUtil.java index 1311a2495ae..8c775a9c8cd 100644 --- a/src/main/java/edu/harvard/iq/dataverse/util/BundleUtil.java +++ b/src/main/java/edu/harvard/iq/dataverse/util/BundleUtil.java @@ -87,17 +87,7 @@ public static ResourceBundle getResourceBundle(String propertyFileName, Locale c if (filesRootDirectory == null || filesRootDirectory.isEmpty()) { bundle = ResourceBundle.getBundle("propertyFiles/" +propertyFileName, currentLocale); } else { - File bundleFileDir = new File(filesRootDirectory); - URL[] urls = null; - try { - urls = new URL[]{bundleFileDir.toURI().toURL()}; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - - ClassLoader loader = new URLClassLoader(urls); - bundle = ResourceBundle.getBundle(propertyFileName, currentLocale, loader); + bundle = ResourceBundle.getBundle(propertyFileName, currentLocale); } return bundle ;