19

I'm using Joomla 1.5.26 with Joom!Fish 2.1.7.

Does any Joom!Fish and/or joomla guru know if it is possible to do a call to JRoute::_() so that it is not intercepted and translated by Joom!Fish ?

If so, please explain. Thanks !

Side note:
What I'm trying to achieve is to make Joom!Fish use the language that I tell it to use rather than the one that site is currently displayed in. I need it to build a specific URl, which is the reason for the JRoute::_() call. If you have a more general solution I would appreciate that as well.

Anton Soradoi
  • 1,841
  • 1
  • 22
  • 36
  • Do you need a solution that requires **no** hacking, or small changes can be made to 'core' Joomla libraries? – irezvin Oct 02 '12 at 09:01
  • Well, right now what I am doing is I manually build the URL by fetching the needed information from "my_table" if the language is the default one or from "jf_contents" if it is not. I'm not very fond of modifying the library files since it makes it troublesome to upgrade to newer versions. If you have a solution that is more "elegant" than what I've described though, I'll gladly hear it anyway. – Anton Soradoi Oct 02 '12 at 14:20
  • AFAIK, the url translator is the `JFRouter` class (`plugins/system/jfrouter.php`). I haven't deeply hacked it, but if your're in luck (and have a debugger), you can step through it and find the setting that it uses in order to determine the language. If this setting is changeable, you can then cache and change the value prior to the `JRoute::_` call and restore it afterwards. – MasterAM Oct 13 '12 at 00:30
  • @MasterAM Thank you for your comment. The call to JRouter is intercepted by Joom!Fish so no, it is not "changeable". What I want is a non-hack solution or an explanation why it cannot be done. – Anton Soradoi Oct 13 '12 at 04:19
  • 1
    What I meant is that JF determines the language based on some property (when it responds to the translation event). As the code is fairly convoluted and I don't know exactly what your setup is, I don't know which property that is. The best I can offer is a pointer to the main suspect (the `jfrouter` plugin) and since I do not have the time to analyze the code myself, I can suggest that you try and break execution in this plugin (using a debugger) and figure out which parameter determines the language. Then, if this parameter is writable, you can change it prior to translation. – MasterAM Oct 13 '12 at 23:25
  • Thanks again for taking the time comment. Joom!Fish uses a cookie as the parameter. What you are describing is almost what I am looking for. I don't want to overwrite the cookie but I will attempt to patch jfrouter so that it ignores the cookie if an additional parameter is given, and uses that parameter instead. I'll report back if I get anywhere with it. – Anton Soradoi Oct 15 '12 at 15:51
  • do you want to change the uri, but what do you want to change? injecting a custom parameter like `index.php?option=com_foobar` becomes `index.php?option=com_foobar&customparameter=hellyes` ? – tampe125 Oct 16 '12 at 14:48
  • @tampe125 I'm thinking more along the lines of JRoute::_("index.php?option=com_foobar", "hellyes"). I haven't actually tried it yet though – Anton Soradoi Oct 16 '12 at 14:57

1 Answers1

2

I think this could be help to you.,

The localization of content is one of these organizational issues which is closely related to organization of your website. In fact it all depends all on the structure of sections, categories and articles you choose for your site.

Please refer the following location :

Setup your site to use different information per language with core JoomFish

John Peter
  • 2,870
  • 3
  • 27
  • 46
  • Thank you for your reply John. The article you linked describes how to load content that is inherently different when a language is switched. I.e. it explains that joomfish is capable of loading a completely new article on a language change instead of just translating current one. What I'm looking for is an ability to load something in a language that is different from the one that the site is currently displayed in. If I missed something, please elaborate on your reply. Thanks! – Anton Soradoi Jan 14 '13 at 20:52