2014-03-27 212 views
0

我有一個Asp.net應用程序,我必須以阿拉伯語言顯示所有日期。所以我用這個函數:寫作阿拉伯語

Public Function ConvertDateToArabic(ByVal _date As DateTime) As String 
     Dim arabicdate As String = "" 
     arabicdate += _date.Year.ToString() 
     Select Case _date.Month 
      Case "1" 
       arabicdate += "جانفي " 
       Exit Select 
      Case "2" 
       arabicdate += "فيفري " 
       Exit Select 
      Case "3" 
       arabicdate += "مارس " 
       Exit Select 
      Case "4" 
       arabicdate += "أفريل " 
       Exit Select 

      Case "5" 
       arabicdate += "ماي " 
       Exit Select 
      Case "6" 
       arabicdate += "جوان " 
       Exit Select 
      Case "7" 
       arabicdate += "جويلية " 
       Exit Select 
      Case "8" 
       arabicdate += "أوت " 
       Exit Select 

      Case "9" 
       arabicdate += "سبتمبر " 
       Exit Select 
      Case "10" 
       arabicdate += "أكتوبر " 
       Exit Select 
      Case "11" 
       arabicdate += "نوفمبر " 
       Exit Select 
      Case "12" 
       arabicdate += "ديسمبر" 
       Exit Select 
      Case Else 
       Exit Select 
     End Select 
     arabicdate += " " + _date.Day.ToString() + " " 
     Return arabicdate 
    End Function 

但我得到了例如錯誤的結果,如果我把第4個2014,我得到的結果2014فيفري4

  1. 是什麼這個問題的原因是什麼?
  2. 我該如何解決?

回答