Sha256: 981255a30d0c4c373e372194e27fd93598e7fe07cac630d49aaeaba04e7aa1f2
Contents?: true
Size: 916 Bytes
Versions: 16
Compression:
Stored size: 916 Bytes
Contents
= Translate with i18n gem Rodauth allows transforming user-facing text configuration such as flash messages, validation errors, labels etc. via the +translate+ configuration method. This method receives a name of a configuration along with its default value, and is expected to return the result text. You can use this to perform translations using the {i18n gem}[https://github.com/ruby-i18n/i18n]: plugin :rodauth do enable :login, :logout, :reset_password translate do |key, default| I18n.translate("rodauth.#{key}") || default end end Your translation file may then look something like this: en: rodauth: login_notice_flash: "You have been signed in" require_login_error_flash: "Login is required for accessing this page" no_matching_login_message: "user with this email address doesn't exist" reset_password_email_subject: "Password Reset Instructions"
Version data entries
16 entries across 16 versions & 1 rubygems