Carga un archivo de internacionalizacion. Si no se especifica el locale carga el archivo por defecto, si no
le agrega el locale pasado como parametro
@param string $file
@param string $locale
165937
function i18n($file, $locale = NULL){
        $this->fileName= $file;
        $this->i18nContent= NULL;
        if($locale != NULL){
            if(file_exists(PATHAPP . 'src/content/' . $file . "_$locale" . '.txt')){
                $this->i18nContent= \E_fn\load_application_file('src/content/' . $file . "_$locale" . '.txt');
                $this->i18nContent= \E_fn\parse_properties($this->i18nContent);
                $this->locale= $locale;
            }
        }
        if($this->i18nContent == NULL){
            $this->i18nContent= \E_fn\load_application_file('src/content/' . $file . '.txt');
            $this->i18nContent= \E_fn\parse_properties($this->i18nContent);
            $this->locale= 'Default';
        }
    }
1037068
public function removeTranslation($document, $locale)
    {
        $class = $this->dm->getClassMetadata(get_class($document));
        if ($invoke = $this->eventListenersInvoker->getSubscribedSystems($class, Event::preRemoveTranslation)) {
            $this->eventListenersInvoker->invoke(
                $class,
                Event::preRemoveTranslation,
                $document,
                new LifecycleEventArgs($document, $this->dm),
                $invoke
            );
        }

        $metadata = $this->dm->getClassMetadata(get_class($document));
        if (!$this->isDocumentTranslatable($metadata)) {
            return;
        }

        if (1 === count($this->getLocalesFor($document))) {
            throw new PHPCRException('The last translation of a translatable document may not be removed');
        }

        if ($document instanceof Proxy) {
            $document->__load();
        }

        $oid = spl_object_hash($document);
        $this->documentTranslations[$oid][$locale] = null;
        $this->setLocale($document, $metadata, null);
    }
1051494
private function locateLanguageFile($localeID)
    {
        $localeIDAlternatives = $this->getLocaleIDAlternatives($localeID);
        $result = null;
        foreach ($localeIDAlternatives as $localeIDAlternative) {
            $languageFile = $this->getAppLanguageFilePath($localeIDAlternative);
            if (!is_file($languageFile)) {
                $languageFile = $this->getCoreLanguageFilePath($localeIDAlternative);
                if (!is_file($languageFile)) {
                    $languageFile = null;
                }
            }
            if ($languageFile !== null) {
                $result = $languageFile;
                break;
            }
        }

        return $result;
    }
1229745
public function pathToFile($file, $locale): string
    {
        return resource_path('lang'.DIRECTORY_SEPARATOR.(is_a($locale, Locale::class) ? $locale->iso6391() : $locale).DIRECTORY_SEPARATOR.$file.'.php');
    }
254118
public function setDefaultLocale($locale) {

		$this->defaultLocale = $locale;

		if (NULL === $this->locale) {
			$this->setPhpDefaultLocale($locale);
		}

	}
392482
public function store($locale)
    {
        foreach ($this->stores as $store) {
            $this->getInstance($store)->store($locale);
        }
    }
1013549
public function setContentLocale($locale)
    {
        Session::put('allLocalesInForm', false);
        if ($locale === 'all') {
            Session::put('allLocalesInForm', true);
        } else {
            Session::put('locale', $locale);
        }
    }
679322
public function initReader( $locale )
    {
        $this->xmlParser = $this->openTranslationFile( $locale, 'SimpleXMLIterator' );
        $this->xmlParser->rewind();
    }
69694
public function setLocale($locale)
    {
        $locale = substr($locale, 0, 2);
        if (in_array($locale, $this->locales)) {
            $this->locale = $locale;
            return true;
        }
        return false;
    }
670541
public function addFile(string $file, string $locale = null): self
	{
		$collection = $this->getCollection($this->getType($file), $locale);
		if ($this->isRemoteFile($file)) {
			$collection->addRemoteFile($file);
		} else {
			$collection->addFile($file);
		}
		return $this;
	}
1279425
final protected function setFileLocation (string $file)
	{
        $file 		= $this->getLocation().$file;
        $pathParts  = pathinfo($file);
        $this->file = !isset($pathParts['extension']) ? $file.".inc" : $file;
	}
140026
private function imageAndFileOutput(File $file, $localeId = null)
	{
		$request = $this->container->getRequest();
		$postInput = $request->isMethod('POST') ? $request->request : $request->query;
		$requestedSizes = $postInput->get('sizes', array());
		$requestedSizeNames = array();
		$isBroken = false;
		$thumbSize = null;
		$previewSize = null;

		try {
			if ($file instanceof Image && $this->getFileStorage()->fileExists($file)) {

				$thumbSize = $this->getFileStorage()->createResizedImage($file, 30, 30, true);
				$previewSize = $this->getFileStorage()->createResizedImage($file, 200, 200);

				foreach ($requestedSizes as $size) {
					$width = filter_var($size['width'], FILTER_VALIDATE_INT);
					$height = filter_var($size['height'], FILTER_VALIDATE_INT);
					$crop = filter_var($size['crop'], FILTER_VALIDATE_BOOLEAN);

					$requestedSizeNames[] = $this->getFileStorage()->createResizedImage($file, $width, $height, $crop);
				}
			}
		} catch (\Exception $e) {
			$isBroken = true;
		}

		$output = $this->getFileStorage()->getFileInfo($file, $localeId);

		// Return only requested sizes
		if ( ! empty($requestedSizeNames)) {
			foreach ($output['sizes'] as $sizeName => $size) {

				if ($sizeName == 'original') {
					continue;
				}

				if ( ! in_array($sizeName, $requestedSizeNames, true)) {
					unset($output['sizes'][$sizeName]);
				}
			}
		}

		// Create thumbnail&preview
		try {
			if ($file instanceof Image && $this->getFileStorage()->fileExists($file)) {
				if ($file->isPublic()) {
					$output['preview'] = $this->getFileStorage()->getWebPath($file, $previewSize);
					$output['thumbnail'] = $this->getFileStorage()->getWebPath($file, $thumbSize);
				} else {
					$output['thumbnail'] = $this->getPrivateImageWebPath($file, $thumbSize);
					$output['file_web_path'] = $output['preview'] = $this->getPrivateImageWebPath($file);

					if ( ! empty($output['sizes'])) {
						foreach ($output['sizes'] as $sizeName => &$size) {
							$sizePath = null;

							if ($sizeName == 'original') {
								$sizePath = $output['file_web_path'];
							} else {
								$sizePath = $this->getPrivateImageWebPath($file, $sizeName);
							}

							$size['external_path'] = $sizePath;
						}
					}
				}
			}
		} catch (\Exception $e) {
			$output['broken'] = true;
			return $output;
		}

		$extension = mb_strtolower($file->getExtension());
		$knownExtensions = $this->container->getParameter('cms.media_library_known_file_extensions');
		if (in_array($extension, $knownExtensions)) {
			$output['known_extension'] = $extension;
		}

		$checkExistance = $this->container->getParameter('cms.media_library_check_file_existence');

		if ($isBroken) {
			$output['broken'] = true;
		} elseif ($checkExistance == self::CHECK_FULL
			|| $checkExistance == self::CHECK_PARTIAL) {

			$output['broken'] = ( ! $this->isAvailable($file));
		}

		$output['timestamp'] = $file->getModificationTime()->getTimestamp();

		// Custom Properties
		$propertyConfigurations = $this->getFileStorage()->getCustomPropertyConfigurations();
		$propertyData = array();
		foreach ($propertyConfigurations as $configuration) {
			/* @var $configuration PropertyConfiguration */
			$propertyName = $configuration->name;
			$propertyData[$propertyName] = $this->getFileStorage()->getFileCustomPropertyValue($file, $propertyName);
		}

		$output['metaData'] = $propertyData;

		return $output;
	}
334704
public function setLocale(
        $locale = null
    ) {
        if (empty($locale)) {
            $locale = $this->getDefaultLocale();
        }

        if (empty($locale)) {
            // @todo warning or error
            return;
        }

        /* Conversion for Ubuntu and Mac local settings. */
        if (!setlocale(LC_MONETARY, $locale . '.utf8')) {
            if (!setlocale(LC_MONETARY, $locale . '.UTF-8')) {
                setlocale(LC_MONETARY, 'en_US.UTF-8');
            }
        }

        /* Conversion for Ubuntu and Mac local settings. */
        if (!setlocale(LC_NUMERIC, $locale . '.utf8')) {
            if (!setlocale(LC_NUMERIC, $locale . '.UTF-8')) {
                setlocale(LC_NUMERIC, 'en_US.UTF-8');
            }
        }

        /* Conversion for Ubuntu and Mac local settings. */
        if (!setlocale(LC_TIME, $locale . '.utf8')) {
            if (!setlocale(LC_TIME, $locale . '.UTF-8')) {
                setlocale(LC_TIME, 'en_US.UTF-8');
            }
        }

        \Locale::setDefault($locale);
    }
206936
private static function _checkLocale($locale)
    {
        if (empty($locale)) {
            $locale = new Zend_Locale();
        }

        if (!(Zend_Locale::isLocale((string) $locale, null, false))) {

            throw new Zend_Locale_Exception("Locale (" . (string) $locale . ") is a unknown locale");
        }

        return (string) $locale;
    }
83898
public void addLables(JKLocale locale, String fileName) {
		addLables(locale, JKIOUtil.readPropertiesFile(fileName));
	}
1278168
public function setLocale($locale)
	{
		if(is_string($locale))
			$locale=CLocale::getInstance($locale);
		$this->sizeFormat['decimalSeparator']=$locale->getNumberSymbol('decimal');
		$this->_locale=$locale;
	}
1190913
public function setLocale($locale)
    {
        /** @var Config $config */
        $config = $this->get('config');
        $config->set('app.locale.selected', $locale);

        /** @noinspection PhpUndefinedMethodInspection */
        $this->get('translator')->setLocale($locale);
    }