By Language:

<% image_counter = 0 %><% @data_by_language.each do |language, content| %>

<%= language %>


<% content.each do |device_name, screens| %> <% screens.each do |screen_path| %><% next if screen_path.include?"_framed.png" %> <% end %> <% end %>
<%= device_name %>
<% image_counter += 1 %> <%= language %> <%= device_name %>
<% end %>

By Screen:

<% image_counter = 0 %><% @data_by_screen.each do |screen, content| %>

<%= screen %>


<% content.each do |device_name, screens| %> <% screens.each do |language, screen_path| %><% next if screen_path.include?"_framed.png" %> <% end %> <% end %>
<%= device_name %>
<% image_counter += 1 %> <%= language %> <%= device_name %>
<%= language %>
<% end %>