Prado\I18N\TGlobalization::getLocalizedResource PHP Method

getLocalizedResource() public method

Returns a list of possible localized files. Example $files = $app->getLocalizedResource("path/to/Home.page","en_US"); will return
array
  0 => 'path/to/en_US/Home.page'
  1 => 'path/to/en/Home.page'
  2 => 'path/to/Home.en_US.page'
  3 => 'path/to/Home.en.page'
  4 => 'path/to/Home.page'
Note that you still need to verify the existance of these files.
public getLocalizedResource ( $file, $culture = null ) : array
return array list of possible localized resource files.
    public function getLocalizedResource($file, $culture = null)
    {
        $files = array();
        $variants = $this->getCultureVariants($culture);
        $path = pathinfo($file);
        foreach ($variants as $variant) {
            $files[] = $path['dirname'] . DIRECTORY_SEPARATOR . $variant . DIRECTORY_SEPARATOR . $path['basename'];
        }
        $filename = substr($path['basename'], 0, strrpos($path['basename'], '.'));
        foreach ($variants as $variant) {
            $files[] = $path['dirname'] . DIRECTORY_SEPARATOR . $filename . '.' . $variant . '.' . $path['extension'];
        }
        $files[] = $file;
        return $files;
    }