- begin
- help = File.read("#{RAILS_ROOT}/config/potlatch/localised/#{lang}/help.html")
- rescue
- help = File.read("#{RAILS_ROOT}/config/potlatch/localised/en/help.html")
- end
+ lang = request.compatible_language_from(getlocales)
+ (real_lang, localised) = getlocalized(lang)
+
+ # Tell Potlatch what language it's using
+ localised["__potlatch_locale"] = real_lang
+
+ # Get help from i18n but delete it so we won't pass it around
+ # twice for nothing
+ help = localised["help_html"]
+ localised.delete("help_html")
+
+ # Populate icon names
+ POTLATCH_PRESETS[10].each { |id|
+ POTLATCH_PRESETS[11][id] = localised["preset_icon_#{id}"]
+ localised.delete("preset_icon_#{id}")
+ }
+