$localeInterface = $objectManager->create('Magento\Framework\Locale\ResolverInterface');
$localeInterface->setLocale('ar_SA');
$localeInterface->setDefaultLocale('ar_SA');
echo __('Check Value');
If you want to use translation on external php script. You have to initialize translation using following code after $state->setAreaCode('frontend');.
$objectManager->get('\Magento\Framework\View\DesignLoader')->load(\Magento\Framework\App\Area::PART_TRANSLATE);
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require 'app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$objectManager->get('\Magento\Framework\View\DesignLoader')->load(\Magento\Framework\App\Area::PART_TRANSLATE);
echo __('Check Value'); // will be print translated value if defined in language csv.