Class YARD::I18n::Locale
In: lib/yard/i18n/locale.rb
Parent: Object

Locale is a unit of translation. It has {name} and a set of messages.

@since 0.8.2

Methods

load   new   translate  

Attributes

name  [R]  @return [String] the name of the locale. It used IETF language
  tag format +[language[_territory][.codeset][@modifier]]+.

@see tools.ietf.org/rfc/bcp/bcp47.txt

  BCP 47 - Tags for Identifying Languages

Public Class methods

Creates a locale for name locale.

@param [String] name the locale name.

Public Instance methods

Loads translation messages from locale_directory/{name}.po.

@param [String] locale_directory the directory path that has

  {#name}.po.

@return [Boolean] true if PO file exists, false otherwise.

@param [String] message the translation target message. @return [String] translated message. If tarnslation isn‘t

  registered, the +message+ is returned.

[Validate]