# File lib/cgikit.rb, line 1804
        def template_file
                if application.master_locale? then
                        "#{path}.html"
                else
                        file = "#{path}_#{application.locale}.html".untaint
                        if FileTest.exist? file then
                                return file
                        end

                        unless request.languages.empty? then
                                request.languages.each do |lang|
                                        file = "#{path}_#{lang}.html".untaint
                                        if FileTest.exist? file then
                                                return file
                                        end
                                end
                        end

                        "#{path}.html"
                end
        end