Skip to content

Commit

Permalink
Use portal language by default in the language filter module
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 10, 2023
1 parent a074a2c commit 2d5e161
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/goo/sparql/solutions_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ def map_each_solutions(select)
private

def get_language(languages)
languages = 'ALL' if languages.nil? || languages.empty?
languages = portal_language if languages.nil? || languages.empty?
lang = languages.split(',').map {|l| l.upcase.to_sym}
return lang.length == 1 ? lang.first : lang
lang.length == 1 ? lang.first : lang
end

def portal_language
Goo.main_languages.first
end

def init_unloaded_attributes(found, list_attributes)
return if @incl.nil?
Expand Down

0 comments on commit 2d5e161

Please sign in to comment.