Created
April 6, 2009 13:32
-
-
Save clemens/90757 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
:en => { | |
:salutation => { | |
:gender => { | |
:male => "Mr", | |
:female => "Mrs", | |
:female_unmarried => "Ms" | |
} | |
:full => lambda { |attributes| | |
gender_salutation = I18n.t(:"salutation.#{attributes[:gender]}") | |
gender_salutation = I18n.t(:'salutation.female_unmarried') if attributes[:gender] == 'female' && !attributes[:married] | |
attributes[:prefix] ||= gender_salutation | |
"Dear #{attributes[:prefix]} #{attributes[:last_name]}" | |
} | |
} | |
}, | |
:de => { | |
:salutation => { | |
:gender => { | |
:male => "Sehr geehrter Herr", # Dear Mr | |
:female => "Sehr geehrte Frau" # Dear Mrs | |
}, | |
:full => lambda { |attributes| | |
gender_salutation = I18n.t(:"salutation.#{attributes[:gender]}") | |
prefix = [gender_salutation, attributes[:prefix]].compact.join(' ') | |
"#{prefix} #{attributes[:last_name]}" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment