সদস্য:Psneog/NumeralsDemo

অসমীয়া ৱিকিপিডিয়াৰ পৰা

The following demonstrates problems with Assamese (Bengali Unicode) numerals are used with parser functions like #expr:

Latin Numerals: 0 1 2 3 4 5 6 7 8 9 Assamese Numerals: ০ ১ ২ ৩ ৪ ৫ ৬ ৭ ৮ ৯ (Bengali unicode)

  • Correct:
    • {{#expr: 2 + 3}}: 5
    • {{CURRENTYEAR}}: 2024
  • Error:
    • {{#expr: ২ + ৩}}: এক্সপ্ৰেছন ত্ৰুটী: অপৰিচিত বিৰামচিহ্ন কেৰেক্টাৰ "২"
    • {{#expr: 2 + ৩}}: এক্সপ্ৰেছন ত্ৰুটী: অপৰিচিত বিৰামচিহ্ন কেৰেক্টাৰ "৩"
    • {{#expr: {{CURRENTYEAR}} + 10}}: 2034
  • Probable solutions:
  1. {{#expr: {{formatnum: {{CURRENTYEAR|R}}}} + 10}}: এক্সপ্ৰেছন ত্ৰুটী: অপৰিচিত বিৰামচিহ্ন কেৰেক্টাৰ ","
  2. Set "$wgTranslateNumerals = false;" in LocalSettings.php

The first solution is not acceptable since there are a lot of templates where functions like {{CURRENTYEAR}}, {{CURRENTDAY}} etc are used. So, we need to modify LocalSettings.php as shown above.