Ah, now I see,
if you put the i18n configuration in application.rb it works. I set the load path in order to load locale files from subdirectories.
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '*', '*.{rb,yml}').to_s]
config.i18n.default_locale = :de
If you put it in a rails initializer it does not.
I18n.load_path += Dir[Rails.root.join('config', 'locales', '*', '*.{rb,yml}').to_s]
I18n.default_locale = :de
Is this a Spree or a Rails issue?
Thx,
Laurens
Am 31.07.2012 um 08:07 schrieb Ryan Bigg:
> Which route is that? I see the following content when I use <%= t(:review_management) %>:
>
> :review_management (from config/locales/spree_reviews/en.yml)
>
> That seems to indicate to me that it's working as intended. Am I missing something?
>
>
> On Sunday, 29 July 2012 at 8:13 PM, Laurens Nienhaus wrote:
>
>> Hi,
>>
>> please see the app code on github
https://github.com/laurens/spree_i18n_test.git
>>
>> I have spree_reviews installed and a config/locales/spree_reviews/en.yml file which overrides the translation key :review_management.
>>
>> For comparison I have included another extension spree_foofah in lib/spree_foofah who‘s translation key :foobar is overridden in config/locales/spree_fofofah/en.yml
>>
>> The latter works, but the former has no effect, which you can see when you visit the app’s /some_bar route
>>
>> Laurens
>>
>>
>> Am 27.07.2012 um 02:53 schrieb Ryan Bigg:
>>> Do you have an example app that we can see this happening in?
>>>
>>> On 27/07/2012, at 2:37 AM, Laurens Nienhaus <
l.nie...@gmail.com (mailto:
l.nie...@gmail.com)> wrote:
>>>
>>>> Hi,
>>>>
>>>> I want to override the localization of an extension (spree_reviews in this case).
>>>>
>>>> So i put my custom translation file in config/locales/spree_reviews/de.yml
>>>> and added the path to I18n.load_path.
>>>>
>>>> However it seems, the extension’s locale files are loaded after the app’s locale files. So my customizations have no effect.
>>>>
>>>> What is the best way to override the translation of an extension?
>>>>
>>>> Thx / Regards,
>>>> Laurens
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "Spree" group.
>>>> To post to this group, send email to
spree...@googlegroups.com (mailto:
spree...@googlegroups.com).
>>>> To unsubscribe from this group, send email to
spree-user+...@googlegroups.com (mailto:
spree-user+...@googlegroups.com).
>>> To post to this group, send email to
spree...@googlegroups.com (mailto:
spree...@googlegroups.com).
>>> To unsubscribe from this group, send email to
spree-user+...@googlegroups.com (mailto:
spree-user+...@googlegroups.com).
>> To post to this group, send email to
spree...@googlegroups.com (mailto:
spree...@googlegroups.com).
>> To unsubscribe from this group, send email to
spree-user+...@googlegroups.com (mailto:
spree-user+...@googlegroups.com).