<%= tr8n_with_options_tag(:default_locale => 'en-US', :admin => true) do %>
<%=link_to_function(image_tag("/tr8n/images/close.gif", :style => "border:0px; padding:5px;", :alt=>trla("Close")), "tr8nLanguageSelector.hide()")%>
<%=trla("Select a Language")%>
<%=render(:partial => "lists") %>
<% unless tr8n_current_user_is_guest? %>
<% if @inline_translations_allowed %>
<% if @inline_translations_enabled %> <%=link_to_function(trla("Disable Inline Translations"), "tr8nLanguageSelector.disableInlineTranslations();")%>
<% else %> <%=link_to_function(trla("Enable Inline Translations"), "tr8nLanguageSelector.enableInlineTranslations();")%>
<% end %> <%=trla("Use right-mouse-click or ctr+click to translate the site.")%>
<% end %> <% if tr8n_current_user_is_translator? %>
<%=link_to_function(trla("Translation Tools"), "tr8nLanguageSelector.showDashboard()")%>
<%=trla("Search for translations by other users, vote on translations or add your own translations.")%>
<% end %> <% if tr8n_current_user_is_admin? or (tr8n_current_user_is_translator? and tr8n_current_translator.manager?) %>
<%=link_to_function(trla("Manage Language"), "tr8nLanguageSelector.manageLanguage()")%> language admins only
<%=trla("Change language native name and define language rules.")%>
<% end %> <% if tr8n_current_user_is_admin? %>
<%=link_to(trla("Configure tr8n"), "/tr8n/admin/language")%> tr8n admins only
<%=trla("Manage translators, languages and translations.")%>
<% end %>
<% end %>
<%=tr8n_help_icon_tag %>   <%=trla("Click this icon to view [link: translation help] in a new window.", "", :link => lambda{|value| link_to(value, "tr8n/help")})%>
<%= form_tag({:controller => :language, :action => :switch}, :id => "language_selector_form", :style=>"padding:0px;margin:0px;") do %> <%=hidden_field_tag(:source_url, @source_url)%> <%=hidden_field_tag(:locale, tr8n_current_language.locale, :id => "language_selector_locale")%> <%=hidden_field_tag(:language_action, "switch_language", :id => "language_selector_action")%> <% end %> <% end %>