If understand your question right, this should lead you in the right way.
In a view we have the text_helper for that:
<?php echo $text_helper->translate(string,array_of_variables_to_bind,scope); ?>
<?php echo $text_helper->translate(
'This is %what',
array('%what'=>'super'),
'global_shared'
); ?>
This will create the folder "global_shared" under app/locales
Unfortunately you can't use Sintags for this, right now.
the translate has an alias: t().
if you don't define a scope, it usually guesses one (the controller name or the model name).
Unfortunately you can't use Sintags for this
I was wrong. I first tried
<%= translate 'Take me %where', :where=>"home", "scope" %>
which leads to translate('Take me %where',array('where'=>'home','scope')), which is wrong, because 'scope' should be our third argument.
So we have to be more specific.
<%= translate 'Take me %where', {"%where"=>"home"}, "scope" %>
is correct and works as expected.
1 to 5 of 5