diff -r -u a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb --- a/lib/redmine/export/pdf.rb 2011-04-08 07:33:02.000000000 +0900 +++ b/lib/redmine/export/pdf.rb 2011-04-10 07:41:14.000000000 +0900 @@ -88,23 +88,23 @@ def initialize(lang) super() set_language_if_valid lang - case current_language.to_s.downcase - when 'ko' + case l(:general_pdf_encoding).upcase + when 'CP949' extend(PDF_Korean) AddUHCFont() @font_for_content = 'UHC' @font_for_footer = 'UHC' - when 'ja' + when 'CP932' extend(PDF_Japanese) AddSJISFont() @font_for_content = 'SJIS' @font_for_footer = 'SJIS' - when 'zh' + when 'GB18030' extend(PDF_Chinese) AddGBFont() @font_for_content = 'GB' @font_for_footer = 'GB' - when 'zh-tw' + when 'BIG5' extend(PDF_Chinese) AddBig5Font() @font_for_content = 'Big5' @@ -189,11 +189,7 @@ # Returns a PDF string of a list of issues def issues_to_pdf(issues, project, query) - if ( current_language.to_s.downcase == 'ko' || - current_language.to_s.downcase == 'ja' || - current_language.to_s.downcase == 'zh' || - current_language.to_s.downcase == 'zh-tw' || - current_language.to_s.downcase == 'th' ) + if l(:general_pdf_encoding).upcase != 'UTF-8' pdf = IFPDF.new(current_language) else pdf = ITCPDF.new(current_language) @@ -269,11 +265,7 @@ # Returns a PDF string of a single issue def issue_to_pdf(issue) - if ( current_language.to_s.downcase == 'ko' || - current_language.to_s.downcase == 'ja' || - current_language.to_s.downcase == 'zh' || - current_language.to_s.downcase == 'zh-tw' || - current_language.to_s.downcase == 'th' ) + if l(:general_pdf_encoding).upcase != 'UTF-8' pdf = IFPDF.new(current_language) else pdf = ITCPDF.new(current_language) diff -r -u a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb --- a/lib/redmine/helpers/gantt.rb 2011-04-08 07:44:23.000000000 +0900 +++ b/lib/redmine/helpers/gantt.rb 2011-04-10 07:40:31.000000000 +0900 @@ -507,11 +507,7 @@ end if Object.const_defined?(:Magick) def to_pdf - if ( current_language.to_s.downcase == 'ko' || - current_language.to_s.downcase == 'ja' || - current_language.to_s.downcase == 'zh' || - current_language.to_s.downcase == 'zh-tw' || - current_language.to_s.downcase == 'th' ) + if l(:general_pdf_encoding).upcase != 'UTF-8' pdf = ::Redmine::Export::PDF::IFPDF.new(current_language) else pdf = ::Redmine::Export::PDF::ITCPDF.new(current_language)