I believe there's an "acceptable template extensions" hash somewhere in the Globalize source that you can modify to add Haml templates.
- Nathan riles01 wrote: > I figured out the problem. Using the following code in the > application.rb controller for Globalize breaks haml: > > def set_locale > default_locale = 'en-US' > request_language = request.env['HTTP_ACCEPT_LANGUAGE'] > request_language = request_language.nil? ? nil : request_language[/ > [^,;]+/] > > # > # This section breaks haml templates; they print as plain text. > # > # @locale = params[:locale] || session[:locale] || > request_language || default_locale > # session[:locale] = @locale > # begin > # Locale.set @locale > # rescue > # @locale = default_locale > # Locale.set @locale > # end > > end > > It appears then that Globalize and haml can't be used together. Do you > happen to know of a fix or another alternative for localization? > > I also found your comment on this from about a month ago: > http://www.mail-archive.com/[email protected]/msg01480.html > > Thanks, > - Ryan > > On Aug 26, 11:29 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote: > >> I've heard of this happening before, and I can never remember what >> causes it... my best guess would be to restart the server. >> >> - Nathan >> >> >> >> riles01 wrote: >> >>> I've just installed haml on a rails app I've been working on. I >>> converted all the templates to haml, but all that displays on the >>> screen is the plain text of what is in my application.haml file. Haml >>> seems to work fine on another app that I have, but I did the exact >>> same procedure on both. I can't find any reason why the template won't >>> work correctly. >>> >>> This is what I see: >>> !!! Strict %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" >>> => "en", :lang => "en"} %head %meta{:http-equiv => "content- >>> type", :content => "text/html;charset=UTF-8"}/ %title== >>> #{controller.controller_name.titleize}: >>> #{controller.action_name.titleize} = stylesheet_link_tag 'default' = >>> javascript_include_tag :defaults %body #header %h1#logo Rails App - if >>> flash[:notice] #notice= flash[:notice] - if @page_title %h1 >>> @page_title = yield- Hide quoted text - >>> >> - Show quoted text - >> > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" 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/haml?hl=en -~----------~----~----~----~------~----~------~--~---
