Skip to content

Conversation

@zawa8
Copy link

@zawa8 zawa8 commented May 27, 2025

translation+transliteration for india/nepal/srilanka/bangladesh languages.

india/nepal/srilanka/bangladesh languages are now-a-days preferrably written in smallcase/unicase latin alphabets. so we can say for these indic languages : latin alphabets + english words + indic grammar is most used. so for india gtr (grammar translation) is required. such a custom translator project is a big project. other option (not so good , but easy) is to do transliteration after translation.
list of indic languages

  1. tamil
  2. hindi
  3. telugu
  4. malayalam
  5. kannada
  6. odia
  7. nepali
  8. marathi
  9. sanskrit
  10. gurmukhi punjabi / punzabi
  11. bangla / bengali
  12. gujarati / guzaraji

to do transliteration htrlib (hscii transliteration library) is used in 2 files .

after translated text ( English/other --to--> indic language ) , transliteration is done as :

  1. linguist/site/translateLocales.ts
    z28flglotus
// linguist/site/translateLocales.ts
import { hsciistr } from 'htrlib';
const hsciistrobz = new hsciistr(
	hsciistr.from_dikt.ascii_and_indik,
	hsciistr.tu_dikt.inglish,
);
if (indiklcodes.includes(to)) {
	translatedText = hsciistrobz.setistr(translatedText).duztr().istr;
}
  1. linguist/src/app/ContentScript/PageTranslator/PageTranslator.tsx
// linguist/src/app/ContentScript/PageTranslator/PageTranslator.tsx
import { hsciistr } from 'htrlib';
const hsciistrobz = new hsciistr(
	hsciistr.from_dikt.ascii_and_indik,
	hsciistr.tu_dikt.inglish,
);

const indiklcodes = [
    'hi',
    'gu',
    'pa',
    'bn',
    'si',
    'or',
    'kn',
    'ml',
    'tl',
    'ta',
];
if (indiklcodes.includes(to)) {
    translatedText = hsciistrobz.setistr(translatedText).duztr().istr;
}

other examples projects for transliteration only :

  1. hsciiwapp
  2. hscii font app
  3. hscii font

@zawa8
Copy link
Author

zawa8 commented May 30, 2025

zioing

@zawa8
Copy link
Author

zawa8 commented May 30, 2025

hin

@zawa8
Copy link
Author

zawa8 commented May 30, 2025

ingl2

@vitonsky
Copy link
Member

Hi @zawa8, currently this pull request have too many changes and will not be merged because it is not clear what purpose of this changes. We have to clarify the purpose and scope of changes in related issue, before continue work on this pull request. You may start from answer comment in related issue #532 (comment)

Also it looks current pull request contains a lot of irrelevant changes. We can accept only minimal needed changes to implement some feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants