Sha256: b593619450f2128e9cad8521098545e1e3d8ed2ad2765e4b62da5d30f079e39c

Contents?: true

Size: 1.32 KB

Versions: 29

Compression:

Stored size: 1.32 KB

Contents

#--
# PDF::Writer for Ruby.
#   http://rubyforge.org/projects/ruby-pdf/
#   Copyright 2003 - 2005 Austin Ziegler.
#
#   Licensed under a MIT-style licence. See LICENCE in the main distribution
#   for full licensing information.
#
# $Id: lang.rb 57 2005-05-18 11:57:58Z austin $
#++

module PDF::Writer::Lang
  @message = {}

  class << self
      # PDF::Writer is fully internationalized. This module method sets the
      # error messages to the specified language Module. The language Module
      # must have a constant Hash called +Message+ containing a set of
      # symbols and localized versions of the messages associated with them.
      #
      # If the file 'pdf/writer/lang/es' contains the module
      # <tt>PDF::Writer::Lang::ES</tt>, the error messages for PDF could be
      # localized to Espaņol thus:
      #
      #   require 'pdf/writer'
      #   require 'pdf/writer/lang/es'
      #
      # Localization is module-global; in a multithreaded program, all
      # threads will use the current language's messages.
      #
      # See PDF::Writer::Lang::EN for more information.
    attr_accessor :language
    def language=(ll) #:nodoc:
      @language = ll
      @message.replace ll.instance_variable_get('@message')
    end

      # Looks up the mesasge
    def [](message_id)
      @message[message_id]
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
rhodes-7.6.0 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-7.5.1 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-7.4.1 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-7.1.17 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-6.2.0 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-6.0.11 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.18 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.17 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.15 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.0.22 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.2 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.0.7 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.0.3 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-5.5.0 lib/extensions/pdf-writer/pdf/writer/lang.rb
tauplatform-1.0.3 lib/extensions/pdf-writer/pdf/writer/lang.rb
tauplatform-1.0.2 lib/extensions/pdf-writer/pdf/writer/lang.rb
tauplatform-1.0.1 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-3.5.1.12 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-3.3.5 lib/extensions/pdf-writer/pdf/writer/lang.rb
rhodes-3.4.2 lib/extensions/pdf-writer/pdf/writer/lang.rb