public function dtatransFilter($id)
    {
        $translator = $this->_container->get('translator');
        $callback   = function($id) {
            $path = $this->_container->get('kernel')->locateResource('@AliDatatableBundle/Resources/translations/messages.en.yml');
            return \Symfony\Component\Yaml\Yaml::parse(file_get_contents($path))['ali']['common'][explode('.', $id)[2]];
        };
        return $translator->trans($id) === $id ? $callback($id) : $translator->trans($id);
    }
public function dtatransFilter($id)
    {
        $translator = $this->_container->get('translator');
        $callback   = function($id) {
            $path = $this->_container->get('kernel')->locateResource('@AliDatatableBundle/Resources/translations/messages.en.yml');
            return \Symfony\Component\Yaml\Yaml::parse(file_get_contents($path))['ali']['common'][explode('.', $id)[2]];
        };
        return $translator->trans($id) === $id ? $callback($id) : $translator->trans($id);
    }
public function dtatransFilter ( $ id ) { $ translator = $ this -> _container -> get ( 'translator' ) ; $ callback = function ( $ id ) { $ path = $ this -> _container -> get ( 'kernel' ) -> locateResource ( '@AliDatatableBundle/Resources/translations/messages.en.yml' ) ; return \ Symfony \ Component \ Yaml \ Yaml :: parse ( file_get_contents ( $ path ) ) [ 'ali' ] [ 'common' ] [ explode ( '.' , $ id ) [ 2 ] ] ; } ; return $ translator -> trans ( $ id ) === $ id ? $ callback ( $ id ) : $ translator -> trans ( $ id ) ; }
Datatable translate filter

@param string $id

@return string
Datatable translate filter