How to change all routes with language codes

add_filter('do_parse_request',function($state){

    // Here you can change every request URL by $_SERVER['REQUEST_URI']

    return $state;

},1,1);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)