We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello all!
I work with RefineryCMS (https://github.com/refinery/refinerycms) and i would like to use your gem in order to translate some refinerycms routes, see my PR on this project : refinery/refinerycms-i18n#51
Is there another way to use conditionally localized method than :
if defined? localized localized do routes end else routes end
I do this because for some english countries, they doesn't want to load localized routes if they doesn't use refinerycms-i18n.
The text was updated successfully, but these errors were encountered:
Right now, from the top off my head I can't think of another way to achieve this.
Of course you could encapsulate that into something like this:
def try_localized(&block) if defined?(localized) localized(&block) else block.call end end
and then use like you would with localized. To decide whether that little abstraction worth it or not is for you to decide 😄
localized
Sorry, something went wrong.
No branches or pull requests
Hello all!
I work with RefineryCMS (https://github.com/refinery/refinerycms) and i would like to use your gem in order to translate some refinerycms routes, see my PR on this project :
refinery/refinerycms-i18n#51
Is there another way to use conditionally localized method than :
I do this because for some english countries, they doesn't want to load localized routes if they doesn't use refinerycms-i18n.
The text was updated successfully, but these errors were encountered: