module PDF::Writer::Lang

Attributes

language[RW]

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 PDF::Writer::Lang::ES, 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.

Public Class Methods

[](message_id) click to toggle source

Looks up the mesasge

# File lib/pdf/writer/lang.rb, line 39
def [](message_id)
  @message[message_id]
end