Translation on root script

is it possible to translate string on root script? i am trying the ff but have no luck

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('memory_limit', '5G');
error_reporting(E_ALL);
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/../app/bootstrap.php';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'no';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
// $bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$storeId = 4;
$emulation = $objectManager->create(\Magento\Store\Model\App\Emulation::class);
$emulation->startEnvironmentEmulation($storeId, \Magento\Framework\App\Area::AREA_FRONTEND, true);
echo __('Text');
$emulation->stopEnvironmentEmulation();

submitted by /u/LingonberryGreedy590
[link] [comments]