This project is archived and is in readonly mode.

#1397 ✓committed
Akira Matsuda

Array#to_sentence(:locale => Asia) improvement

Reported by Akira Matsuda | November 18th, 2008 @ 05:22 AM

Similar to #1294

Array#to_sentence method cannot properly handle the corresponding expression in Eastern languages which don't use those characters (like Japanese, Chinese, etc).

Problem here again, is that comma and space character are hardcoded inside the "I18n ready" source code.

This patch moves these "Western" characrers into the locale resource file, without changing the default en-US behavior.

This enables Array#to_sentence to generate a natural spoken Japanese with the following locale settings.


ja-JP:
  support:
    array:
      words_connector: "と"
      two_words_connector: "と"
      last_word_connector: "と"

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages