public static function getLanguageURL($language) {

        // Initialize the directory.
        $dir = ObjectHelper::getDirectory(JQueryDataTablesBundle::class);
        $dir .= "/Resources/public/datatables-i18n/%language%.json";

        // Initialize the URI.
        $uri = "/bundles/jquerydatatables/datatables-i18n/%language%.json";

        // Initialize the URL.
        $url = StringHelper::replace($uri, ["%language%"], [$language]);

        // Initialize and check the filename.
        $file = StringHelper::replace($dir, ["%language%"], [$language]);
        if (false === file_exists($file)) {
            throw new FileNotFoundException(null, 500, null, $url);
        }

        return $url;
    }
public static function getLanguageURL($language) {

        // Initialize the directory.
        $dir = ObjectHelper::getDirectory(JQueryDataTablesBundle::class);
        $dir .= "/Resources/public/datatables-i18n/%language%.json";

        // Initialize the URI.
        $uri = "/bundles/jquerydatatables/datatables-i18n/%language%.json";

        // Initialize the URL.
        $url = StringHelper::replace($uri, ["%language%"], [$language]);

        // Initialize and check the filename.
        $file = StringHelper::replace($dir, ["%language%"], [$language]);
        if (false === file_exists($file)) {
            throw new FileNotFoundException(null, 500, null, $url);
        }

        return $url;
    }
public static function getLanguageURL ( $ language ) { // Initialize the directory. $ dir = ObjectHelper :: getDirectory ( JQueryDataTablesBundle :: class ) ; $ dir .= "/Resources/public/datatables-i18n/%language%.json" ; // Initialize the URI. $ uri = "/bundles/jquerydatatables/datatables-i18n/%language%.json" ; // Initialize the URL. $ url = StringHelper :: replace ( $ uri , [ "%language%" ] , [ $ language ] ) ; // Initialize and check the filename. $ file = StringHelper :: replace ( $ dir , [ "%language%" ] , [ $ language ] ) ; if ( false === file_exists ( $ file ) ) { throw new FileNotFoundException ( null , 500 , null , $ url ) ; } return $ url ; }
Get a language URL.

@param string $language The language.
@return string Returns the language URL.
@throws FileNotFoundException Throws a file not found exception if the language file does not exist.
Get a language URL .