We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bd9ef8a + f47197b commit 3e4dbbfCopy full SHA for 3e4dbbf
1 file changed
src/GoogleTranslate.php
@@ -364,6 +364,9 @@ function ($matches) {
364
*/
365
protected function injectParameters(string $string, array $replacements): string
366
{
367
+ // Remove space added by google in the parameters
368
+ $string = preg_replace('/#\{\s*(\d+)\s*\}/', '#{$1}', $string);
369
+
370
return preg_replace_callback(
371
'/\#{(\d+)}/',
372
fn($matches) => $replacements[$matches[1]],
0 commit comments