src/basis/l10n.js
function resolveToken(path){
    if (path.charAt(0) == '#')
    {
      // return index by absolute index
      return tokenIndex[parseInt(path.substr(1), 36)];
    }
    else
    {
      var parts = path.match(/^(.+?)@(.+)$/);

      if (parts)
        return resolveDictionary(basis.path.resolve(parts[2])).token(parts[1]);

      /** @cut */ basis.dev.warn('basis.l10n.token accepts token references in format `token.path@path/to/dict.l10n` only');
    }
  }
function resolveToken(path){
    if (path.charAt(0) == '#')
    {
      // return index by absolute index
      return tokenIndex[parseInt(path.substr(1), 36)];
    }
    else
    {
      var parts = path.match(/^(.+?)@(.+)$/);

      if (parts)
        return resolveDictionary(basis.path.resolve(parts[2])).token(parts[1]);

      /** @cut */ basis.dev.warn('basis.l10n.token accepts token references in format `token.path@path/to/dict.l10n` only');
    }
  }
function resolveToken ( path ) { if ( path . charAt ( 0 ) == '#' ) { // return index by absolute index return tokenIndex [ parseInt ( path . substr ( 1 ) , 36 ) ] ; } else { var parts = path . match ( / ^(.+?)@(.+)$ / ) ; if ( parts ) return resolveDictionary ( basis . path . resolve ( parts [ 2 ] ) ) . token ( parts [ 1 ] ) ; /** @cut */ basis . dev . warn ( 'basis.l10n.token accepts token references in format `token.path@path/to/dict.l10n` only' ) ; } }
Returns token for path. Path also may be index reference, that used in production.
@example
basis.l10n.token('token.path@path/to/dict');  // token by name and dictionary location
basis.l10n.token('#123');  // get token by base 36 index, use in production
@name basis.l10n.token
@param {string} path
@return {basis.l10n.Token}
Returns token for path . Path also may be index reference that used in production .