htaccess将语言部分添加到现有重定向规则

I have quite a complex .htaccess with 30 redirect rules. Now the client wants to add language specific parts to the beginning of the urls.

Example: http://example.eu/sale should be http://example.eu/de/sale where "de" is the language code for one of the 5 languages.

I've found this:

RewriteRule ^(en|de|fr|ja|ru)/(.*)$  $2?language=$1 [L,QSA]

Is there a simple way to add this feature to existing rules? (Below is some of the existing rules)

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.eu$ [NC]
RewriteRule (.*) http://example.eu/$1 [R=301,L]

RewriteRule ^sale sale.php [NC]
RewriteRule ^brands/([^/]+) /designer.php?idnr=$1 [NC]
RewriteRule ^product/([^/]+)/([^/]+) /product.php?pid=$1&fsite=$2 [NC]
  1. Make sure all your R rules are at the top.
  2. RIght after R rules you should have your new rule:

    RewriteRule ^(en|de|fr|ja|ru)/(.*)$  $2?language=$1 [L,QSA]
    
  3. Rest of internal rewrite rules should always end with these flags:

    [L,QSA,NC]