you could just write it like that : 
```
$bewertung = str_format (localize("ratingword", $rating), $rating);
```

Run tools/updateLang.pl and you can handle it like bookword in the languages Json files : 

```
"bookword.many":"{0} books",
"bookword.none":"No book",
"bookword.one":"1 book",
"bookword.title":"Books",
```