Class: Liquid::I18n

### Home Classes Methods

### In Files

- lib/liquid/i18n.rb

### Parent

Object

### Namespace

- CLASS Liquid::I18n::TranslationError

### Methods

- ::new
- #locale
- #t
- #translate

### Class/Module Index

Quicksearch

- Liquid
- Liquid::ArgumentError
- Liquid::Assign
- Liquid::BlankFileSystem
- Liquid::Block
- Liquid::Break
- Liquid::BreakInterrupt
- Liquid::Capture
- Liquid::Case
- Liquid::Comment
- Liquid::Context
- Liquid::ContextError
- Liquid::Continue
- Liquid::ContinueInterrupt
- Liquid::Cycle
- Liquid::Decrement
- Liquid::Document
- Liquid::Drop
- Liquid::ElseCondition
- Liquid::Error
- Liquid::FileSystemError
- Liquid::FilterNotFound
- Liquid::For
- Liquid::I18n
- Liquid::I18n::TranslationError
- Liquid::If
- Liquid::Ifchanged
- Liquid::Include
- Liquid::Increment
- Liquid::Interrupt
- Liquid::Lexer
- Liquid::LocalFileSystem
- Liquid::MemoryError
- Liquid::Parser
- Liquid::Raw
- Liquid::StackLevelError
- Liquid::StandardError
- Liquid::StandardFilters
- Liquid::SyntaxError
- Liquid::TableRow
- Liquid::Tag
- Liquid::Template
- Liquid::Unless
- Liquid::Utils
- Liquid::Variable
- FalseClass
- LiquidView
- Module
- NilClass
- TrueClass

No matching classes.

# Liquid::I18n

### Constants

DEFAULT_LOCALE

### Attributes

path[R]

### Public Class Methods

new(path = DEFAULT_LOCALE) click to toggle source

    # File lib/liquid/i18n.rb, line 12
    def initialize(path = DEFAULT_LOCALE)
      @path = path
    end

### Public Instance Methods

locale() click to toggle source

    # File lib/liquid/i18n.rb, line 21
    def locale
      @locale ||= YAML.load_file(@path)
    end

t(name, vars = {}) click to toggle source
Alias for: translate
translate(name, vars = {}) click to toggle source

    # File lib/liquid/i18n.rb, line 16
    def translate(name, vars = {})
      interpolate(deep_fetch_translation(name), vars)
    end

Also aliased as: t

[Validate]

Generated with the Darkfish Rdoc Generator 2.