def initialize_with_i18n_routing(*args)
      initialize_without_i18n_routing(*args)

      # Add i18n_locale as valid conditions for Rack::Mount / And add also :locale, as Rails 3.0.4 removed it ...
      @valid_conditions = @set.instance_eval { @set }.instance_eval { @valid_conditions }
      [:i18n_locale, :locale].each do |k|
        @set.valid_conditions[k] = true if !@set.valid_conditions.has_key?(k)
      end

      # Extends the current RouteSet in order to define localized helper for named routes
      # When calling define_url_helper, it calls define_localized_url_helper too.
      if !@set.named_routes.respond_to?(:define_localized_url_helper)
        @set.named_routes.class_eval <<-END_EVAL, __FILE__, __LINE__ + 1
          alias_method :localized_define_url_helper, :define_url_helper
          def define_url_helper(route, name, kind, options)
            localized_define_url_helper(route, name, kind, options)
            define_localized_url_helper(route, name, kind, options)
          end
        END_EVAL

        @set.named_routes.extend I18nRouting::NamedRouteCollection
      end
    end
def initialize_with_i18n_routing(*args)
      initialize_without_i18n_routing(*args)

      # Add i18n_locale as valid conditions for Rack::Mount / And add also :locale, as Rails 3.0.4 removed it ...
      @valid_conditions = @set.instance_eval { @set }.instance_eval { @valid_conditions }
      [:i18n_locale, :locale].each do |k|
        @set.valid_conditions[k] = true if !@set.valid_conditions.has_key?(k)
      end

      # Extends the current RouteSet in order to define localized helper for named routes
      # When calling define_url_helper, it calls define_localized_url_helper too.
      if !@set.named_routes.respond_to?(:define_localized_url_helper)
        @set.named_routes.class_eval <<-END_EVAL, __FILE__, __LINE__ + 1
          alias_method :localized_define_url_helper, :define_url_helper
          def define_url_helper(route, name, kind, options)
            localized_define_url_helper(route, name, kind, options)
            define_localized_url_helper(route, name, kind, options)
          end
        END_EVAL

        @set.named_routes.extend I18nRouting::NamedRouteCollection
      end
    end
On Routing::Mapper initialization (when doing Application.routes.draw do ...)
 prepare routing system to be i18n ready