diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi
index 0ffd6bd94..a6f1300d0 100644
--- a/html/cgi-bin/wireguard.cgi
+++ b/html/cgi-bin/wireguard.cgi
@@ -440,7 +440,7 @@ END
 
 	# If a port was given we check that it is valid
 	} elsif (!&Network::check_port($cgiparams{'PORT'})) {
-		push(@errormessages, $LANG::tr{'invalid port'});
+		push(@errormessages, _('Invalid Port'));
 	}
 
 	# Check the endpoint address
