I solved my problem. All I needed was the WordPress Rewrite API.
if( ! function_exists('theme_add_rewrite_rules') ){
function theme_add_rewrite_rules(){
add_rewrite_rule(
'^blog/([^/]+)/?$',
'index.php?name=$matches[1]',
'top'
);
}
}
add_action( 'init', 'theme_add_rewrite_rules');
This solves how wordpress will parse the URL. Half of the problem is how to modify the posts so that the links will not include the /en/ slug. The code below should solve that problem.
if( ! function_exists('rewrite_blog_url')){
function rewrite_blog_url($url){
if( strpos( $url, '/en/blog/' ) >= 0 ){
return str_replace( '/en/blog/', '/blog/', $url );
}
return $url;
}
}
if( ! function_exists('rewrite_blog_post_url')){
function rewrite_blog_post_url( $url, $post, $leavename ) {
if ( $post->post_type == 'post' ) {
return rewrite_blog_url($url);
}
return $url;
}
}
add_filter('the_permalink', 'rewrite_blog_url');
add_filter('the_content', 'rewrite_blog_url');
add_filter('post_link', 'rewrite_blog_url');