Normal Topic Return Month Names in Another Language (Read 2973 times)
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Return Month Names in Another Language
Feb 23rd, 2004 at 4:16pm
Print Post Print Post  
This returns the names in Spanish, but can easily be altered to whichever language is needed.
Code
Select All
Function GetSpanishMonth(vMonth as Int) As String
var vSNames as Array[12] of String
var vReturn as String

 // Initialize the return value
 vReturn = ""

 // Populate month names
 vSNames[1] = "Enero"
 vSNames[2] = "Febrero"
 vSNames[3] = "Marcha"
 vSNames[4] = "Abril"
 vSNames[5] = "Pueda"
 vSNames[6] = "Junio"
 vSNames[7] = "Julio"
 vSNames[8] = "Agosto"
 vSNames[9] = "Septiembre"
 vSNames[10] = "Octubre"
 vSNames[11] = "Noviembre"
 vSNames[12] = "Diciembre"

 If vMonth >= 1 And vMonth <= 12 Then
 {
  vReturn = vSNames[vMonth]
 }
 return(vReturn)

End Function

WriteLn(GetSpanishMonth(@Month(Date_Entered)))
 

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged