Skip to content
New issue

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

Translatable external URL #84

Open
matteotrubini opened this issue May 11, 2018 · 5 comments
Open

Translatable external URL #84

matteotrubini opened this issue May 11, 2018 · 5 comments

Comments

@matteotrubini
Copy link

CONTEXT:
multilanguage website managed with Rainlab.Translate

NEEDS:
menu items liked to external URL could have different href depending on current locale:

  • IT => google.it
  • ES => google.es

Simply add external_url and url to $translatable fields

public $translatable = ['title', 'description'];
is not sufficient due to how internal/external URL values are saved (unique url attribute plus is_external flag).

Do you think you can support that?

In the meanwhile, the only workaround that I see is to use a CMS page to manage a "redirect router" somehow. Any other ideas?

@matteotrubini matteotrubini changed the title External URL translatable Translatable external URL May 11, 2018
@osmanzeki
Copy link

I had the same problem and to fix it I had to fork the plugin, add a field for internal_url and external_url and change the way the $this->url logic works. I don't think there are other ways around this issue. You have to have a field for both internal and external as far as I know.

@matteotrubini
Copy link
Author

@osmanzeki do you have considered to place a PR with your changes?

@osmanzeki
Copy link

osmanzeki commented Jun 16, 2018

@matteotrubini I considered it but as things sometimes are I had a deadline to meet and did not attempt a backward compatible approach. As such I had to add columns and change the way the URL is handled overall. I'll see if I have time to attempt an api compatible PR when I have a minute to work on this.

@matteotrubini
Copy link
Author

@osmanzeki got it, I've the same troubles 😄
@benfreke a migration that update the table schema and reorganize old data would be acceptable by your POV? It will ensure BC.

@benfreke
Copy link
Owner

@matteotrubini yes, as long as there is no breaking changes I'm ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants