Skip to content

Commit

Permalink
[DS-1336] Creative Commons Locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Corrales Correyero authored and helix84 committed Dec 5, 2012
1 parent 3bfe6b4 commit ba00313
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dspace-api/src/main/java/org/dspace/license/CCLookup.java
Expand Up @@ -116,7 +116,7 @@ public Collection<CCLicense> getLicenses(String language) {
try {
JDOMXPath xp_Licenses = new JDOMXPath("//licenses/license");
JDOMXPath xp_LicenseID = new JDOMXPath("@id");
URL classUrl = new URL(this.cc_root + "/classes");
URL classUrl = new URL(this.cc_root + "/classes?locale=" + language);
Document classDoc = this.parser.build(classUrl);
// extract the identifiers and labels using XPath
List<Element> results = xp_Licenses.selectNodes(classDoc);
Expand Down Expand Up @@ -155,7 +155,7 @@ public Collection<CCLicense> getLicenses(String language) {
* @see CCLicense
*
*/
public Collection<CCLicenseField> getLicenseFields(String license) {
public Collection<CCLicenseField> getLicenseFields(String license, String language) {

JDOMXPath xp_LicenseField;
JDOMXPath xp_LicenseID;
Expand Down Expand Up @@ -185,7 +185,7 @@ public Collection<CCLicenseField> getLicenseFields(String license) {

// retrieve and parse the license class document
try {
classUrl = new URL(this.cc_root + "/license/" + license);
classUrl = new URL(this.cc_root + "/license/" + license + "?locale=" + language);
} catch (Exception err) {
// do nothing... but we should
return null;
Expand Down

0 comments on commit ba00313

Please sign in to comment.