- if object.tags.include? "name:#{I18n.locale}"
- name = t 'printable_name.with_name', :name => object.tags["name:#{I18n.locale}"].to_s, :id => name
+ locale = I18n.locale.to_s
+
+ while locale =~ /-[^-]+/ and not object.tags.include? "name:#{I18n.locale}"
+ locale = locale.sub(/-[^-]+/, "")
+ end
+
+ if object.tags.include? "name:#{locale}"
+ name = t 'printable_name.with_name_html', :name => content_tag(:bdi, object.tags["name:#{locale}"].to_s ), :id => content_tag(:bdi, name)