I forgot to mention the GLoc internal method ..

    def _l_has_string?(symbol,lang) #:nodoc:
      symbol= symbol.to_sym if symbol.is_a?(String)
      LOCALIZED_STRINGS[lang].has_key?(symbol.to_sym) rescue false
    end


On 29 déc, 18:32, Erwin <[email protected]> wrote:
> I am moving to a full I18 rails app from a GLoc plugin one...
>
> I try to test if  translation symbol exist , like Gloc is doing :
>
> # Returns <tt>true</tt> if a localized string with the specified key
> exists.
> def l_has_string?(symbol)
>   return GLoc._l_has_string?(symbol,current_language)
> end
>
> how can I mock it up ?
>
> thanks for your help
>
> erwin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to