AbstractNavbarMenuBuilder has been replaced

what is the new solution to overwide block from the menu template ?
to get translator twig function for example ?