src/prologue/i18n/i18n

Source   Edit  

Types

Translator = object
  language*: string
  ctx*: Context
Source   Edit  

Procs

proc loadTranslate(app: Prologue; filename: string) {.inline,
    ...raises: [IOError, OSError, Exception, ValueError, KeyError],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Source   Edit  
proc loadTranslate(filename: string): TableRef[string, StringTableRef] {.inline,
    ...raises: [IOError, OSError, Exception, ValueError, KeyError],
    tags: [ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
Source   Edit  
proc loadTranslate(stream: Stream; filename = "[stream]"): TableRef[string,
    StringTableRef] {....raises: [IOError, OSError, Exception, ValueError, KeyError],
                      tags: [ReadIOEffect, RootEffect, WriteIOEffect],
                      forbids: [].}
Source   Edit  
proc setLanguage(ctx: Context; language: string): Translator {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc Tr(ctx: Context; text: string; language: string): string {.inline,
    ...raises: [KeyError], tags: [], forbids: [].}
Helper function for translate. Source   Edit  
proc Tr(t: Translator; text: string): string {.inline, ...raises: [KeyError],
    tags: [], forbids: [].}
Source   Edit  
proc translate(ctx: Context; text: string; language: string): string {.inline,
    ...raises: [KeyError], tags: [], forbids: [].}
Translates text by language. Source   Edit  
proc translate(t: Translator; text: string): string {.inline,
    ...raises: [KeyError], tags: [], forbids: [].}
Source   Edit