]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/language.rb
Committing first of trace view i18n untested
[rails.git] / app / models / language.rb
index 8965cf4532a141b2a514f53a729df2f2d6ad8303..81441db5c4ff0665f845b7eb147d5d02446c1d34 100644 (file)
@@ -3,4 +3,10 @@ class Language < ActiveRecord::Base
 
   has_many :users, :foreign_key => 'locale'
   has_many :diary_entries, :foreign_key => 'language'
+
+  def name
+    name = english_name
+    name += " (#{native_name})" unless native_name.nil?
+    name
+  end  
 end