Jump to content

អ្នកប្រើប្រាស់:វ័ណថារិទ្ធ/ប្រអប់ខ្សាច់/Khmer vs Arabic numerals

ពីវិគីភីឌា

The following demonstrates the problem:

  • Arabic Numerals: 0 1 2 3 4 5 6 7 8 9
  • Khmer Numerals: ០ ១ ២ ៣ ៤ ៥ ៦ ៧ ៨ ៩ (Khmer unicode)

Correct:

  • {{#expr: 2 + 3}}: 5
  • {{CURRENTYEAR}}: ២០២៤
    • {{#time:xnY}}: 2024 - instead of magic word {{CURRENTYEAR}} Khmer Wikipedia use this {{#time:xnY}}
  • {{convert|123|lb|kg}}: 123 pounds (56 kg)
  • {{convert|១២៣|lb|kg}}: Conversion error: Value "១២៣" must be a number


Error:

  • {{#expr: ២ + ៣}}: Expression error: Unrecognized punctuation character "២". (expected: ៥)
  • {{#expr: 2 + ៣}}: Expression error: Unrecognized punctuation character "៣". (expected: ៥)
  • {{#expr: {{CURRENTYEAR}} + 10}}: Expression error: Unrecognized punctuation character "២". (expected: ២០២៣, if the current year is 2013)
  • {{#expr: ២២ + ៣៣}}: Expression error: Unrecognized punctuation character "២". (expected: ៥៥)
  • {{#expr: 2 + ៣២}}: Expression error: Unrecognized punctuation character "៣". (expected: ៣៤)
  • {{#expr: {{CURRENTYEAR}} + ៣៤}}: Expression error: Unrecognized punctuation character "២". (expected: ២០៤៧, if the current year is 2013)


Probable solutions:

  1. {{#expr: {{formatnum: {{CURRENTYEAR}}|R}} + 10}}: 2034 (expected: 2023)
  2. Set "$wgTranslateNumerals = false;" in LocalSettings.php