I have the following method, the value inside subscribe is correct, but outside of the subscribe scope, it is blank.
getTranslation(text: string): string {
  var translatedText: string = "";
  this.translate.get(text).subscribe((text: string) => {
  translatedText = text;
  alert(translatedText);
 });
  alert(translatedText);
  return translatedText;
 }
 
    