Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am not sure if my answer will satisfy your requirements but I suggest (especially as you don't want to change the locale on the server) to use a function that will give you the answer:</p> <p>To my knowledge (<a href="http://en.wikipedia.org/wiki/Comma-separated_values#Lack_of_a_standard" rel="nofollow">and also Wikipedia's it seems</a>) the list separator in a CSV is a comma unless the decimal point of the locale is a comma, in that case the list separator is a semicolon.</p> <p>So you could get a list of all locales that use a comma (Unicode U+002C) as separator using this command:</p> <pre><code>cd /usr/share/i18n/locales/ grep decimal_point.*2C *_* -l </code></pre> <p>and you could then take this list to determine the appropriate list separator:</p> <pre><code>function get_csv_list_separator($locale) { $locales_with_comma_separator = "az_AZ be_BY bg_BG bs_BA ca_ES crh_UA cs_CZ da_DK de_AT de_BE de_DE de_LU el_CY el_GR es_AR es_BO es_CL es_CO es_CR es_EC es_ES es_PY es_UY es_VE et_EE eu_ES eu_ES@euro ff_SN fi_FI fr_BE fr_CA fr_FR fr_LU gl_ES hr_HR ht_HT hu_HU id_ID is_IS it_IT ka_GE kk_KZ ky_KG lt_LT lv_LV mg_MG mk_MK mn_MN nb_NO nl_AW nl_NL nn_NO pap_AN pl_PL pt_BR pt_PT ro_RO ru_RU ru_UA rw_RW se_NO sk_SK sl_SI sq_AL sq_MK sr_ME sr_RS sr_RS@latin sv_SE tg_TJ tr_TR tt_RU@iqtelif uk_UA vi_VN wo_SN"); if (stripos($locales_with_comma_separator, $locale) !== false) { return ";"; } return ","; } </code></pre> <p>(the list of locales is taken from my own Debian machine, I don't know about the completeness of the list)</p> <p>If you don't want to have this static list of locales (though I assume that this doesn't change <em>that</em> often), you can of course generate the list using the command above and cache it.</p> <p>As a final note, according to <a href="http://tools.ietf.org/html/rfc4180" rel="nofollow">RFC4180 section 2.6</a> the list separator actually never changes but rather fields containing a comma (so this also means floating numbers, depending on the locale) should be enclosed in double-quotes. Though (as linked above) not many people follow the RFC standard.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload