[Pas2js] resourcestrings structure

warleyalex warleyalex at yahoo.com.br
Thu Aug 8 02:01:25 CEST 2019


Creating my own alternative mechanism, of course, to translations strings. 
Just curious, I can't find a way to generate similar JSON structure when
using resourcestrings.

var resources = {
  'en_GB': { 
    translation: { 
      'menu': {
        'Good bye': 'Good bye! $t(menu.country)',
        'Hello': 'Hello! $t(menu.country)',
        'Selectyourlanguage': 'Select your language: $t(menu.country)',
		'country': 'England'
      }                           
    } 
  },            
  'fr_FR': { 
    translation: { 
      'menu': {
        'Good bye': 'Au revoir ! $t(menu.country)',
        'Hello': 'Bonjour ! $t(menu.country)',
        'Selectyourlanguage': 'SĂ©lectionner votre langage:
$t(menu.country)',
        'country': 'France'
      }                           
    } 
  },
  'it_IT': { 
    translation: { 
      'menu': {
        'Good bye': 'Arrivederci! $t(menu.country)',
        'Hello': 'Buongiorno! $t(menu.country)',
        'Selectyourlanguage': 'Seleziona la tua lingua: $t(menu.country)',
        'country': 'Italy'
      }                           
    } 
  },
  'br_BR': { 
    translation: { 
      'menu': {
        'Good bye': 'Oi! $t(menu.country)',
        'Hello': 'Olá! $t(menu.country)',
        'Selectyourlanguage': 'Selecione seu idioma: $t(menu.country)',
        'country': 'Brasil'
      }                           
    } 
  }    
};




--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list