Skip to content

Internationalization and Locales

Florent Guilleux edited this page Jan 5, 2017 · 17 revisions

Kaminari is shipped with a locale file in English (en) that defines words like Previous, Next, Last and the other strings that the gem outputs.

Below are some user-contributed locales which may be of use. The gem does not maintain locales itself and the examples here may be outdated, so check the master copy to make sure you have every string covered. If you write a new locale, please consider sharing it here.

To use, paste into a file like config/locales/kaminari-de.yml or include in your current locale file.

de - German

de:
  views:
    pagination:
      first: "« Erste"
      last: "Letzte »"
      previous: "‹ Vorherige"
      next: "Nächste ›"
      truncate: "…"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "Keine %{entry_name} gefunden"
          one: "Zeige <b>1</b> %{entry_name} an"
          other: "Zeige <b>alle %{count}</b> %{entry_name} an"
      more_pages:
        display_entries: "Zeige %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> von insgesamt an <b>%{total}</b>"

en-GB - British English

en-GB:
  views:
    pagination:
      first: "&laquo; First"
      last: "Last &raquo;"
      previous: "&lsaquo; Prev"
      next: "Next &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "No %{entry_name} found"
          one: "Displaying <b>1</b> %{entry_name}"
          other: "Displaying <b>all %{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Displaying %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> of <b>%{total}</b> in total"

es - Spanish

es:
  views:
    pagination:
      first: "&laquo; Primero"
      last: "Último &raquo;"
      previous: "&lsaquo; Anterior"
      next: "Siguiente &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "No se encontró %{entry_name}"
          one: "Mostrando <b>1</b> %{entry_name}"
          other: "Mostrando <b>%{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Mostrando %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> de <b>%{total}</b> en total"

fr - French

fr:
  views:
    pagination:
      first: "&laquo; Première"
      last: "Dernière &raquo;"
      previous: "&lsaquo; Précédente"
      next: "Suivante &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "Aucun(e) %{entry_name} trouvé(e)s"
          one: "Affichage de <b>1</b> %{entry_name}"
          other: "Affichage des <b>%{count}</b> %{entry_name}"
      more_pages:
        display_entries: "%{entry_name} <b>%{first}</b> à <b>%{last}</b> affiché(e)s sur <b>%{total}</b> au total"

pt-BR - Brazilian Portuguese

pt-BR:
  views:
    pagination:
      first: "&laquo; Primeira"
      last: "Última &raquo;"
      previous: "&lsaquo; Anterior"
      next: "Próxima &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "Nenhum %{entry_name} encontrado(a)"
          one: "Exibindo <b>1</b> %{entry_name}"
          other: "Exibindo <b>%{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Exibindo %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> de <b>%{total}</b> no total"

ru - Russian

ru:
  views:
    pagination:
      first: "&laquo; Первая"
      last: "Последняя &raquo;"
      previous: "&lsaquo; Пред."
      next: "Следующая &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "%{entry_name.capitalize} не найдено"
          one: "Отображение <b>1</b> %{entry_name}"
          other: "Отображение <b>все %{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Отображение %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> из <b>%{total}</b> всего"

nl - Dutch

nl:
  views:
    pagination:
      first: "&laquo; Eerste"
      last: "Laatste &raquo;"
      previous: "&lsaquo; Vorige"
      next: "Volgende &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "Geen %{entry_name} gevonden"
          one: "Toon <b>1</b> %{entry_name}"
          other: "Toon <b>alle %{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Toon %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> van <b>%{total}</b> in totaal"

zh-CN - Simplified Chinese

zh-CN:
  views:
    pagination:
      first: "&laquo; 第一页"
      last: "最后一页 &raquo;"
      previous: "&lsaquo; 上一页"
      next: "下一页 &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "没有任何 %{entry_name}"
          one: "显示 <b>1</b> 个 %{entry_name}"
          other: "显示 <b>全部 %{count}</b> 个 %{entry_name}"
      more_pages:
        display_entries: "显示 <b>%{total}</b> 个 %{entry_name} 中的第 <b>%{first}&nbsp;-&nbsp;%{last}</b> 个"

zh-TW - Mandarin Chinese

zh-TW:
  views:
    pagination:
      first: "&laquo; 第一頁"
      last: "最後一頁 &raquo;"
      previous: "&lsaquo; 上一頁"
      next: "下一頁 &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "沒有任何 %{entry_name}"
          one: "顯示 <b>1</b> 筆 %{entry_name}"
          other: "顯示 <b>全部 %{count}</b> 筆 %{entry_name}"
      more_pages:
        display_entries: "顯示 <b>%{total}</b> 筆 %{entry_name} 中的第 <b>%{first}&nbsp;-&nbsp;%{last}</b> 筆"

ja - Japanese

ja:
  views:
    pagination:
      first: "&laquo; 最初"
      last: "最後 &raquo;"
      previous: "&lsaquo; 前"
      next: "次 &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "%{entry_name}がありません"
          one: "<b>一つの</b>%{entry_name}しか表示されていません"
          other: "他<b>%{count}</b>個の%{entry_name}が表示されています"
      more_pages:
        display_entries: "<b>%{first}&nbsp;-&nbsp;%{last}</b> 全部<b>%{total}</b>個の%{entry_name}が表示されています"

fr - French

# Sample localization file for Kaminari. You can override these values in your app's locales file if you want.

fr:
  views:
    pagination:
      first: "&laquo; Première page"
      last: "Dernière page &raquo;"
      previous: "&lsaquo; Précédent"
      next: "Suivant &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "%{entry_name} introuvable"
          one: "Visualiser <b>1</b> %{entry_name}"
          other: "Visualiser <b>tout %{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Visualiser %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> de <b>%{total}</b> au total"

it - Italian

it:
  views:
    pagination:
      first: "&laquo; Prima"
      last: "Ultima &raquo;"
      previous: "&lsaquo; Precedente"
      next: "Successiva &rsaquo;"
      truncate: "&hellip;"
  helpers:
    page_entries_info:
      one_page:
        display_entries:
          zero: "Nessuna %{entry_name} trovata"
          one: "Stai visualizzando <b>1</b> %{entry_name}"
          other: "Stai visualizzando <b> %{count}</b> %{entry_name}"
      more_pages:
        display_entries: "Stai visualizzando %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> su <b>%{total}</b> totali"
You can’t perform that action at this time.