import Examples from "../components/src/Examples";
import * as T from "../types";
const spellingOptions: {
value: T.TextOptions["spelling"];
label: string;
}[] = [
{
value: "Afghan",
label: "Afghan",
},
{
value: "Pakistani ي",
label: "Pakistani ي",
},
{
value: "Pakistani ی",
label: "Pakistani ی",
},
];
const phoneticsOptions: {
value: T.TextOptions["phonetics"];
label: string;
}[] = [
{
value: "lingdocs",
label: "LingDocs",
},
{
value: "ipa",
label: "IPA",
},
{
value: "alalc",
label: "ALALC",
},
];
function SpellingDemo({
opts,
onChange,
}: {
opts: T.TextOptions;
onChange: (opts: T.TextOptions) => void;
}) {
return (
- Converts text between Afghan and Pakistani spelling conventions
-
Generates diacritics for Pashto script when given phonetic script
along with Pashto script
Pashto Spelling Convention:
{spellingOptions.map(({ value, label }) => (
{
onChange({
...opts,
spelling: value,
});
}}
/>
))}
Latin Phonetic System:
{phoneticsOptions.map(({ value, label }) => (
{
onChange({
...opts,
phonetics: value,
});
}}
/>
))}
{[
{
p: "زما زوی مکتب ته ځي",
f: "zmaa zooy maktab ta dzee",
},
{
p: "دا ښه سړی دی",
f: "daa xu saRey day",
},
{
p: "په دکان کې مې ډېر خلک لیدلي دي",
f: "pu dUkaan ke me Der khalk leedulee dee",
},
]}
);
}
export default SpellingDemo;