Tuesday, April 1, 2014

Getting my global geek on

Today I received Happy Ugadi greetings from the Swift eLearning team:



A quick check on Wikipedia informs me: 

Yugādi,Telugu:Ugadi (ఉగాది/యుగాది), (Ugādi 'Samvatsarādi Kannadaಯುಗಾದಿ Yugadi , Konkani/Marathi: युगादि yugādi) is the New Year's Day for the people of the Deccan region of India. The name Yugadi or Ugadi is derived from the Sanskrit words yuga (age) and ādi (beginning): "the beginning of a new age". It falls on a different day every year because the Hindu calendar is a lunisolar calendar. The Saka calendar begins with the month of Chaitra (March–April) and Ugadi marks the first day of the new year. Chaitra is the first month in Panchanga which is the Indian calendar.

The question is, do I send a greeting in Telugu, Kannada, Konkani, or Marathi?

JS to the rescue:


var lang = "language";

if (lang = "Telugu") {

"-ఉగాది శుభాకాంక్షలు"

}

else if (lang = "Kannada") {

"ಯುಗಾದಿ ಹಬ್ಬದ ಶುಭಾಶಯಗಳು"

}

else if (lang = "Konkani" ) {

"Navve varsache shubhashay, Samsar padvyache shubhashay."

}

else if (lang = "Marathi") {

"'गुढी पाडव्याच्या हार्दिक शुभेच्छा'" 

}

else {

"Happy Ugadi!"


}

I didn't want to limit the critique of my JS to just my readers, so I posted on StackFlow: http://stackoverflow.com/questions/22790439/js-formula-for-ugadi-greeting


No comments:

Post a Comment