#26 new
calavera

I18n, look up a translation with the default locale when it's missed with another specific locale

Reported by calavera | May 13th, 2009 @ 10:20 PM

This feature has already been validated, revised and voted in the Rails tracker

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2637-patch-i18n-look-up-a-translation-with-the-default-locale-when-its-missed-with-another-specific-locale#ticket-2637-11

've added an I18n option to allow to look up a translation with the default locale when it's missed with another specific locale.

This is a useful option if you don't want your page will crash when misses a translation and you don't want to use the default option in each translation. It's inspired by the gettext behaviour.

For example, I have this code in an initializer:

  I18n.use_default_locale_on_missing_translation = true
  I18n.default_locale = :en

And two translation files, en.yml and es.yml:

  en:

hello: 'hello'
hello_world: 'hello world'



es:
hello_world: 'hola mundo'</code>



When I execute this code:

  I18n.t :hello, :locale => :es

Rails returns hello instead of send an error

Comments and changes to this ticket

  • Madicim1958

    Madicim1958 January 20th, 2019 @ 06:06 AM

    Good information from the author. Here this posts the list of school result shown their brilliant students and their trained teachers. This assignment writing help australia to manage any kind of post. Amazing information from this blog.

  • markpitt

    markpitt January 2nd, 2020 @ 10:43 AM

    You shared a useful post and thanks for sharing this to us. Keep sharing the new things like this. For getting more updates about the best apps you can check this apps for pc.

  • Adam Thomas

    Adam Thomas January 7th, 2020 @ 01:13 PM

    AllAssignmentHelp.com helps Students sometimes get troubles with these assignments and projects. While Java is still a fair programming language as compared to other languages, it is still very complicated to make assignments and projects. Students often take Java homework help from the online research paper writing services to help them out from this difficult situation.
    https://www.allassignmenthelp.com/us/buy-college-term-paper.html

    mba thesis writing services
    custom term paper writing
    best research paper writing service

  • pbawerawi

    pbawerawi April 30th, 2020 @ 05:36 AM

    Den løpeskoen ønsker å kaste. Du kan muligens gå gjennom denne EVORIDE for å hjelpe helt ny Sense of balance Vazee Desire, Saucony Kinvara 11, Skechers Electric shaver 3, en original ASICS Roadhawk https://www.simandysko.com/ , adidas Birkenstock boston RAISE, i tillegg til Nike Zoomfly 3. Det er bare en lett i vektlærer som kan koble dette hullet forbundet med vanlig lærer for å hjelpe hurtiglærer.

  • dubbmill

    dubbmill May 26th, 2020 @ 06:47 AM

    Thanks for the post and nice to see this here. Looking for how to use chromecast without wifi Make sure you update the Chromecast to the latest version of its firmware. Chromecast Guest Mode allows a sender device to cast to it when that sender device is nearby, without requiring it to be connected to the same WiFi network.

  • slotxo

    slotxo May 30th, 2021 @ 09:26 AM

    northbristol เป็นเรื่องง่าย mavoixtavoie การเล่น herbalpertpresents ยิ่งทำได้สะดวกมากขึ้น reeffutures2018 เพราะแบบนี้จึงมีคำกล่าวที่ว่าในหมู่นักเดิมพัน xopg.net/ เนื่องจากเกมนี้มันสามารถเล่นผ่านหลายแพลตฟอร์มได้ ดังนั้น มันจึงตอบโจทย์ผู้เล่น และได้รับความสนใจมากเป็นพิเศษ แต่นอกจากเรื่องการเข้าถึงง่ายแล้วยังมีข้อดีต่าง ๆ อีกมากมาย

  • slotxo

    slotxo June 3rd, 2021 @ 12:35 PM

    xo สล็อตออนไลน์เกม โปรสล็อต XO ที่ทำออกมาให้ความสนุก สมัคร xo และผ่อนคลายแรงกระแทกต่าง ๆ SLOTXO ที่ผู้เล่นเจอมาเท่านั้น แต่เคยสงสัยไหมว่า ทดลองเล่น xo ทำไมพอได้เข้ามาลองเล่นเกมนี้แล้ว xopg.net/ ส่วนใหญ่จะหยุดเล่นไม่ค่อยได้ นั่นก็เป็นเพราะว่าเกมนี้ มันมีดี

  • slotxo

    slotxo June 9th, 2021 @ 12:18 PM

    northbristol วงล้อหมุนไป mavoixtavoie แล้วจะปรากฏรูปสัญลักษณ์ herbalpertpresents ต่าง ๆ ขึ้นมาในแต่ละรอบ reeffutures2018 คุณทราบไหมว่าสล็อตออนไลน์ xopg.net/ สามารถหมุนให้สัญลักษณ์แตกต่างกันได้เป็นร้อยรอบโดยไม่ต้องมีรอบซ้ำเลย essentialsforasoul แต่หากสังเกตดี ๆ จะเห็นได้ว่าในการหมุนแต่ละครั้งมักจะออกซ้ำกันบ่อย gclub เพราะแบบนี้เองที่ทำให้ท่านกำลังได้รู้ถึงจุดอ่อนของเจ้าสล็อตออนไลน์เข้าแล้ว

  • slotxo

    slotxo June 17th, 2021 @ 12:19 PM

    AMBBET เมื่อเราเล่นเกมสล็อตชนะ ambbet โปร หรือได้โบนัสตามเงื่อนไข AMB ของคาสิโนออนไลน์ สมัคร amb บอกเลยว่า บาคาร่า เงินทุกบาทที่ได้จากการ เกมสล็อต เล่น เว็บคาสิโน สามารถเอาออกมาใช้ได้จริง เกมคาสิโน สำหรับการเล่นนี้

  • slotxo

    slotxo June 18th, 2021 @ 12:24 PM

    pg สล็อตเป็นเกม โปร pg ที่ใครก็สามารถ สมัคร pg เข้ามาหาความสนุก PG SLOT และเพลิดเพลินกับบริการสุดประทับใจได้ ทดลองเล่น pg 24 ชั่วโมง เทคนิคสล็อต ยิ่งในปัจจุบัน สล็อต PG ที่การเข้าถึงอินเตอร์เน็ต

  • slotxo

    slotxo June 23rd, 2021 @ 01:30 PM

    northbristol วงล้อหมุนไป mavoixtavoie แล้วจะปรากฏรูปสัญลักษณ์ herbalpertpresents ต่าง ๆ ขึ้นมาในแต่ละรอบ reeffutures2018 คุณทราบไหมว่าสล็อตออนไลน์ xopg.net/ สามารถหมุนให้สัญลักษณ์แตกต่างกันได้เป็นร้อยรอบโดยไม่ต้องมีรอบซ้ำเลย essentialsforasoul แต่หากสังเกตดี ๆ จะเห็นได้ว่าในการหมุนแต่ละครั้งมักจะออกซ้ำกันบ่อย gclub เพราะแบบนี้เองที่ทำให้ท่านกำลังได้รู้ถึงจุดอ่อนของเจ้าสล็อตออนไลน์เข้าแล้ว

  • slotxo

    slotxo June 24th, 2021 @ 02:07 PM

    joker gaming รวมกับการวางแผนการเงินในการ joker โปร ลงเดิมพันของนัก สมัคร joker เดิมพันด้วย หากจะลอง เทคนิคสล็อต สังเกตในสล็อตออนไลน์ slot joker จะเห็นได้ว่าเมื่อ

  • slotxo

    slotxo June 29th, 2021 @ 11:10 AM

    เทคนิคสล็อต มากกว่าที่เราเห็น สล็อต xo หรือเคยได้ยินมายังไงล่ะ northbristol ซึ่งต้องเป็นคนที่เข้ามาเดิมพัน mavoixtavoie เท่านั้น herbalpertpresents ถึงจะทราบในข้อดีส่วนนี้ reeffutures2018 ความจริงแล้วสล็อต gclub ออนไลน์เป็นเกมที่ต้องอาศัยการคำนวณเข้าามาช่วยนิดหน่อย

  • slotxo

    slotxo June 30th, 2021 @ 11:45 AM

    AMBBET เมื่อเราเล่นเกมสล็อตชนะ ambbet โปร หรือได้โบนัสตามเงื่อนไข AMB ของคาสิโนออนไลน์ สมัคร amb บอกเลยว่า บาคาร่า เงินทุกบาทที่ได้จากการ เกมสล็อต เล่น เว็บคาสิโน สามารถเอาออกมาใช้ได้จริง เกมคาสิโน สำหรับการเล่นนี้

  • Govjob

    Govjob June 30th, 2021 @ 01:24 PM

    GeoHomeCorfu is the best website for finding the best home appliance.

  • slotxo

    slotxo June 30th, 2021 @ 02:54 PM

    เทคนิคสล็อต มากกว่าที่เราเห็น สล็อต xo หรือเคยได้ยินมายังไงล่ะ northbristol ซึ่งต้องเป็นคนที่เข้ามาเดิมพัน mavoixtavoie เท่านั้น herbalpertpresents ถึงจะทราบในข้อดีส่วนนี้ reeffutures2018 ความจริงแล้วสล็อต gclub ออนไลน์เป็นเกมที่ต้องอาศัยการคำนวณเข้าามาช่วยนิดหน่อย

  • nicolesmith

    nicolesmith July 28th, 2021 @ 08:15 AM

    I have no interest in your update. I am here because I like to share something that is not related to this ticket. I hope that there is no problem with that coz other members also share off topic here. Anyway, the thing I wanted to share here is about a game called happy wheels. It is my current favorite game. If you love racing games, you will love it. And if you have an interest in reading gaming related articles visit games.lol/blog/lilys-garden-ads-game-plot/.

  • Rise Hluoluo

    Rise Hluoluo August 10th, 2021 @ 12:53 PM

    Mari Kita Kenali Ortoreksia – Walau motivasi luar ortoreksia berlainan dengan anoreksia , https://tas-mewah.com/ ke-2 masalah makan mempunyai kemauan yang serupa.

    Untuk mengaturhidup dan emosi tidak nyaman saat memakai makanan. Selanjutnya beberapa orang coba turunkan berat tubuh dengan alasan membenahi kesehatan mereka.

  • Ranveer

    Ranveer October 2nd, 2021 @ 03:14 PM

    Just check the best front load washing machine in India from here so that you get a laundry partner for washing your clothes.

  • Mira

    Mira June 19th, 2022 @ 10:36 AM

    Thanks for sharing this! If you are looking for utility locating contractor, please visit my website for more information.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff

People watching this ticket

Attachments

Pages