import { Injectable } from '@angular/core'; import { LanguageData } from './language.model'; import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http'; import { ConfigData } from './configdata'; @Injectable({ providedIn: 'root' }) export class LanguageService { private baseURL = 'http://localhost:8080/getlang'; constructor(private http:HttpClient) { } httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) }; _getViewElements ( viewName:string, encoding:string = 'en-US' ){ const vElem : string = '{' + '"login_confirm_login":"ZGo confirma su ingreso en la cadena de Zcash"' + ',' + '"login_connect_to_zgo":"Conectar su billetera a ZGo"' + ',' + '"login_enter_pin":"Ingrese el PIN enviado por ZGo para confirmar su billetera:"' + ',' + '"login_last_block":"Ultimo Bloque Verificado: "' + ',' + '"login_link_wallet":"Asociar Billetera"' + '}'; return vElem; } getViewElements ( viewName:string, encoding:string = 'en-US' ) { return this.http.get(this.baseURL + '/?lang_id=' + encoding + '&viewname=' + viewName); } }