Template:Th-rm/doc
This is the documentation page for Th-rm. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
Template to automate the romanization of Thai text based on the Petit Planet Wiki:Thai guidelines.
Syntax
edit{{th-rm|Thai text|capi = include to capitalize each word|sent = include to use sentence case}}
- The romanization follows the Petit Planet Wiki:Thai guidelines, which are based on the Royal Thai General System of Transcription (RTGS).
- The template is primarily intended as an automatic fallback for the Other languages template. Editors should provide a manual romanization when a name has an irregular or otherwise ambiguous pronunciation.
- Capitalization
- capi can be used to capitalize each word in the romanization. For example:
- {{th-rm|สถาบันไทยคดีศึกษา|capi = 1}} yields: SathabanaityokdisueksaⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
- sent can be used to capitalize the first word and words following sentence-ending punctuation. For example:
- {{th-rm|สวัสดีครับ. วันนี้เป็นอย่างไรบ้าง|sent = 1}} yields: Swatdikrap. wannipenoi-ngainba-ngaⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
- Hyphenation and spacing corrections
- < > can be added to insert a space into the romanization.
- <-> can be added to insert a hyphen into the romanization.
- These corrections should only be used when the automatic romanization cannot determine the desired separation.
- For example:
- {{th-rm|สง่า<->งาม}} yields: song-ngamⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
Examples
edit- Default
{{th-rm|สง่างาม}} yields: songngamⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|ทราย}} yields: saiⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|จริง}} yields: chingⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|ศรี}} yields: siⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|บุตร}} yields: butraⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|เพชร}} yields: phetraⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|ลักษณ์}} yields: laksonⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
- Words with spaces
{{th-rm|สถาบันไทยคดีศึกษา}} yields: sathabanaityokdisueksaⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|โชคชัย จิตงาม}} yields: chokchai chitngamⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
- Forced capitalization
{{th-rm|สถาบันไทยคดีศึกษา|capi = 1}} yields: SathabanaityokdisueksaⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
- Sentence case
{{th-rm|สวัสดีครับ. วันนี้เป็นอย่างไรบ้าง|sent = 1}} yields: Swatdikrap. wannipenoi-ngainba-ngaⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
- Consonant exceptions
{{th-rm|ทราย}} yields: saiⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|ทราบ}} yields: sapⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|ทรง}} yields: songⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|หนา}} yields: naⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|หนี}} yields: niⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|จริง}} yields: chingⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
{{th-rm|ศรี}} yields: siⓘThis romanization was generated automatically. Please add a user-curated romanization as soon as possible.
Notes
edit- Thai words normally do not use spaces to separate words. Automatic romanization therefore cannot always determine word boundaries from Thai orthography alone.
- When a manual romanization is supplied to a template using this module as a fallback, the manual romanization should take precedence.
- This module follows the romanization rules described at Petit Planet Wiki:Thai rather than attempting to provide a phonetic transcription of Thai.
Template Data
editTemplate to automate the romanization of Thai text.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Text | 1 | Thai text to be romanized.
| String | required |
| Title Case | capi | Transform the romanization into title case. | Boolean | suggested |
| Sentence Case | sent | Transform the romanization into sentence case. | Boolean | suggested |