Skip to content

Commit e20b76d

Browse files
committed
add language selector
1 parent 1ad4935 commit e20b76d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/App.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import "./styles.css";
44

55
export default function App() {
66
const [text, setText] = useState("Jónapot kívánok");
7+
const [language, setLanguage] = useState("hu-HU");
8+
79
return (
810
<div className="App">
911
<h1>Szövegből beszéd</h1>
@@ -14,7 +16,18 @@ export default function App() {
1416
/>
1517
<br />
1618
<br />
17-
<Speech lang="hu-HU" text={text} pause resume />
19+
<select
20+
value={language}
21+
onChange={({ target: { value } }) => setLanguage(value)}
22+
>
23+
<option value="hu-HU">magyar</option>
24+
<option value="en-EN">angol</option>
25+
<option value="de-DE">német</option>
26+
<option value="fr-FR">franica</option>
27+
</select>
28+
<br />
29+
<br />
30+
<Speech lang={language} text={text} pause resume />
1831
<br />
1932
<br />
2033
<p style={{ fontSize: 11 }}>[email protected]</p>

0 commit comments

Comments
 (0)