To display special characters correctly in a web browser, it's a good idea to decode the result data with utf8_decode:
<?php
echo utf8_decode(Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'fr'));
echo utf8_decode(Locale::getDisplayLanguage('sl-Latn-IT-nedis', 'pt-BR'));
?>