<% var dict = data.dictionary; %> <% function getLanguageFallbackKey(str) { var fallbackLanguageKey = str; if (fallbackLanguageKey) { var splittedLanguages = fallbackLanguageKey.split('-'); fallbackLanguageKey = splittedLanguages[splittedLanguages.length - 1]; fallbackLanguageKey = fallbackLanguageKey.charAt(0).toUpperCase() + fallbackLanguageKey.slice(1).toLowerCase(); } return fallbackLanguageKey; } %>