imathis / octopress

Octopress is an obsessively designed framework for Jekyll blogging. It’s easy to configure and easy to deploy. Sweet huh?
http://github.com/imathis/octopress
9.31k stars 2.62k forks source link

i18n, l10n how to? #332

Closed vigo closed 12 years ago

vigo commented 12 years ago

hi, i love octopress and i would like to create my blog in Turkish. How can i fix Date information? I'm not a Ruby developer. Is there any way to do this? Different day names, month names, abbr. etc... Also, maybe some i18n feature would be great. Thanks

imathis commented 12 years ago

I'm not sure what your date format is like, but you should be able to make a change in your _config.yml on line 16.

You'll want to reference Ruby's documentation on date formats.

When you refer to i18n features, what specifically would you like? I'm a native English speaker so I'm not as in tune to the challenges of blogging in other languages.

vigo commented 12 years ago

hi, thanks for reply. the thing is, i want to see dates in Turkish. December 2011 should be "Aralık 2011". All the month names and their abbr. a simple example: DEC 18TH, 2011 must be at least "18 ARA 2011". changing placements are ok with date formatting but month/day names and abbr. are not possible. I really loved Octopress and I want to migrate my all sites / blogs. All i need is to fix month/day names. I'm python developer and not good in Ruby. If Ruby does not supports locales, maybe a dictionary hash, english word: users_word style solution?

imathis commented 12 years ago

I'm actually not sure how to localize dates with Ruby. I'm asking on Twitter. I will find a way :)

vigo commented 12 years ago

Thank you. I'm soo excited.

ahmet commented 12 years ago

Wondering how could it be done, too :)

imathis commented 12 years ago

I've gotten some responses on twitter, so far nothing compelling. Still on the hunt.

vigo commented 12 years ago

Can anyone override Date class? I tried via irb:

require 'Date'
Date::MONTHNAMES
# => [nil, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
Date::ABBR_DAYNAMES
# => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
Date::ABBR_MONTHNAMES
# => [nil, "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]

I don't now how to integrate this to Octopress...

krisbulman commented 12 years ago

This may help: http://guides.rubyonrails.org/i18n.html & https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale

Turkish locale

https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/tr.yml

vigo commented 12 years ago

@krisbulman i'm not a ruby programmer or ror developer. how can i integrate this to octopress? can you help me out please?

krisbulman commented 12 years ago

sorry, wish i were able to help further, but I'm not sure how to proceed.

vigo commented 12 years ago

i forked and managed to create octopress-tr edition. fixed date function by my style (: i wish i had enough knowledge to implement i18n feature.