Class: Trestle::Mobility::TranslationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Trestle::Mobility::TranslationsController
- Defined in:
- app/controllers/trestle/mobility/translations_controller.rb
Instance Method Summary collapse
Instance Method Details
#translate ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/trestle/mobility/translations_controller.rb', line 2 def translate translation = Trestle::Mobility::Translators::DeeplTranslator.new.translate( translation_params[:text], translation_params[:from_locale], translation_params[:to_locale], translation_params[:query_params] || {} ) render plain: translation end |