# CalendarCtrl - Weekdays names - Month names

**URL:** <https://www.ruby-forum.com/t/calendarctrl-weekdays-names-month-names/156504>\
**Category:** wxRuby\
**Created:** [December 29, 2008, 8:28am UTC](https://www.ruby-forum.com/t/calendarctrl-weekdays-names-month-names/156504 "2008-12-29T08:28:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Troncoso\_Phi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@Carlos\_Troncoso\_Phi](https://www.ruby-forum.com/u/Carlos_Troncoso_Phi)\
**Post date:** [December 29, 2008, 8:28am UTC](https://www.ruby-forum.com/t/calendarctrl-weekdays-names-month-names/156504/1 "2008-12-29T08:28:37Z")

</div>

Hi there!  
I’ve been using wxRuby for some days, and already done some quite neat  
apps, but (there is always a but) even though I thought WeekDays names  
and month names where governed by the OS (and local localization), my  
calendar shows up with english names.  
I haven’t been able to find a method or attr on the calendarctrl to  
override this.  
So, is it possible to use custom names (Mon-Tue-Wed-Thu-Fri-Sat-Sun) -\>  
(Lu-Ma-Mi-Ju-Vi-Sa-Do) as well as month names for use in foreign apps?  
Best regards  
Carlos Troncoso Phillips

---

<div class="post-metadata">

**Author:** ![Carlos\_Troncoso\_Phi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3d9bf3/32.png) [@Carlos\_Troncoso\_Phi](https://www.ruby-forum.com/u/Carlos_Troncoso_Phi)\
**Post date:** [December 31, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/calendarctrl-weekdays-names-month-names/156504/2 "2008-12-31T17:12:43Z")

</div>

Hi

Carlos Troncoso Phillips wrote:

> I’ve been using wxRuby for some days, and already done some quite neat  
> apps, but (there is always a but) even though I thought WeekDays names  
> and month names where governed by the OS (and local localization), my  
> calendar shows up with english names.  
> I haven’t been able to find a method or attr on the calendarctrl to  
> override this.  
> So, is it possible to use custom names (Mon-Tue-Wed-Thu-Fri-Sat-Sun) →   
> (Lu-Ma-Mi-Ju-Vi-Sa-Do) as well as month names for use in foreign apps?

My native locale is en\_GB, but when I added this to the top of the  
calendar sample:

Wx::Locale.new(Wx::LANGUAGE\_FRENCH)

the calendar control correctly displays the weekdays as “Lun Mar Mer  
Jeu…” and with the french month names. This is on OS X.

I had a look at the wxWidgets code that handles this, and it should be  
using the same locale-sensitive system calls as Ruby itself. Could you  
say a) what operating system you’re using and b) whether a ruby call  
like

Time.now.strftime(“%A”)

returns the correct local name?

You could try adding a call like the above  
Wx::Locale.new(Wx::LANGUAGE\_XXX) for the correct language to see if that  
sets what you want.

alex
