samples/with-shell-navigation/helpers.js
// Translate based on translations for the provided language key 
Translate based on translations for the provided language key
Translate based on translations for the provided language key
function translate(lang) {
  const I18N = getTranslation(lang);
  document.getElementById('actions-edit-title').innerHTML = I18N.EDIT_TITLE;
  document.getElementById('actions-edit-text').innerHTML = I18N.EDIT_TEXT;
  document.getElementById('extension-title').innerHTML = I18N.EXTENSION_TITLE;
  document.getElementById('home-title').innerHTML = I18N.HOME_TITLE;
  document.getElementById('home-text').innerHTML = I18N.HOME_TEXT;
  document.getElementById('link-to-edit-text').innerHTML = I18N.LINK_TO_EDIT_TEXT;
  document.getElementById('link-to-home-text').innerHTML = I18N.LINK_TO_HOME_TEXT;
  document.getElementById('not-found-title').innerHTML = I18N.NOT_FOUND_TITLE;
  document.getElementById('not-found-text').innerHTML = I18N.NOT_FOUND_TEXT;
  document.getElementById('side-home-title').innerHTML = I18N.SIDE_HOME_TITLE;
  document.getElementById('side-actions-title').innerHTML = I18N.SIDE_ACTIONS_TITLE;
  document.getElementById('side-edit-title').innerHTML = I18N.SIDE_EDIT_TITLE;
}
function translate ( lang ) { const I18N = getTranslation ( lang ) ; document . getElementById ( 'actions-edit-title' ) . innerHTML = I18N . EDIT_TITLE ; document . getElementById ( 'actions-edit-text' ) . innerHTML = I18N . EDIT_TEXT ; document . getElementById ( 'extension-title' ) . innerHTML = I18N . EXTENSION_TITLE ; document . getElementById ( 'home-title' ) . innerHTML = I18N . HOME_TITLE ; document . getElementById ( 'home-text' ) . innerHTML = I18N . HOME_TEXT ; document . getElementById ( 'link-to-edit-text' ) . innerHTML = I18N . LINK_TO_EDIT_TEXT ; document . getElementById ( 'link-to-home-text' ) . innerHTML = I18N . LINK_TO_HOME_TEXT ; document . getElementById ( 'not-found-title' ) . innerHTML = I18N . NOT_FOUND_TITLE ; document . getElementById ( 'not-found-text' ) . innerHTML = I18N . NOT_FOUND_TEXT ; document . getElementById ( 'side-home-title' ) . innerHTML = I18N . SIDE_HOME_TITLE ; document . getElementById ( 'side-actions-title' ) . innerHTML = I18N . SIDE_ACTIONS_TITLE ; document . getElementById ( 'side-edit-title' ) . innerHTML = I18N . SIDE_EDIT_TITLE ; }
Translate based on translations for the provided language key
Translate based on translations for the provided language key