Joomla Multiple language - php

I installed joomla language extension and it works fine with the Joomla Administration panel. Now my requirement is to provide language changing option on my front end. Let's say once someone select French he should get existing French articles. And if he change the language to English he should get English articles.
I searched google, but I couldn't get any clue how to get done this. Any help or article highly appreciated.
Thanks.

Simple answer, when you submit an article / add them / whatever you can tag them with the language and then load it from there.
And of course if you are taking articles from a whole bunch of other sites, what you can do to automate this process is to take 300-500 of the most used words / characters that are specific to that particular language and then determine it from there. If you get other articles that you cannot determine, add more words or do it manually
protip: words like "or" and "and" are quite often used consider using them

If you are using Joomla 1.5, you may be interested in this component:
Joomfish
It doesn't work exactly as you said. For example, if you create your articles in English, you can translate them, so when a user views your site in French, he will get the French translation of that article, or the English version of the article if you haven't translated it.
This component also bundles a language switcher module.
If you're using Joomla 1.7, you already have a language switcher module and a language manager, but I think it won't fit to your needs if you need to have completely different articles for different languages, it's intended to have the same articles in different languages.
I hope it helped!

Finally I found relevant language extensions from following link.
http://joomlacode.org/gf/project/jtranslation1_6/frs/?action=index

Related

Language code and i18n in Wordpress

I have created a .po file to translate the custom template text. But this isn't what I want to achieve. I only want Wordpress to translate the texts when it's on the matching language code .com/en/... Now it translates everything on the same URL which means I can only see one language and for example not visit the Dutch version by going to .com/nl/..
Is it possible to add language code in the URL which translates to matching language?
Hopefully this makes sense, if not I'll explain better.
To translate a Wordpress Website, you may need a plugin that make this. As much as you add a "/ nl", if you do not have a plugin that translates the whole web and you modify the language of wordpress, the wordpress itself will not know that you have changed the language and will always show the same ".po".

Joomla language switcher override

I'm trying to force the language swither module not to redirect to the home page if there is no menu item associations in Joomla 2.5.
I would just like to change country code in the current URL.
So that 'my-domain.com/en/menu?view=cat&id=1' translate to: 'my-domain.com/de/menu?view=cat&id=1' and so on ...
I guess I should modify modLanguagesHelper class but do not know how to create a required $language->link to work properly through JRoute.
Any help is appreciated!
Joomla usually does that by default. It seems strange that it doesn't with the approach you have followed.
Although, reading the comments you left, I understand it's not an easy task and you have already built quite a big part of the website, to go back to structure.
If I were you, I would write a small custom module to change the lang=xx or /xx/ in the URL, and redirect the user to the language they want. If you need help on that, feel free to comment below.
As per your question, I would personally go with simple string manipulation. Since you are really familiar with PHP (taking into consideration that you have written your own custom component), it should be a piece of cake for you, to:
Get the current URL
Get the current language tag
Replace the instances of lang=en with lang=de (example languages, you get the point)
Replace the instances of yoursite.com/en/ with yoursite.com/de/
Print the custom links, flags or whatever you are going to use.
It's not the suggested scenario, but you can really make a usable module if you also add:
An option for the administrator to write the language codes to use (to allow for later additions)
And make sure that you get the site name dynamically, and then you may also have a module that could be published in the JED to help others in the same situation like you!

Language switcher Block is not working in drupal

I am using language switcher block to make my drupal website linguistic. It showing language switcher block but when i click to any language then content is not translated. URL is changed based on language select.
I am using language switcher & Internationalization module.
I already added languages by going through config/languages. I also publish my content by enabling Multilingual support with translation. In translate tab i enables the operation as translated.
Actually I follow all the steps but don't know why my content is not translated. I can't figure out problems. Any one can give me some pointers??
Thanks in advance
There are so many stages involved when managing Multilingual content, between the various modules involved as well as the Configuration settings, it will probably be quite difficult to debug your problem from afar.
Whenever I set up a multilingual website, I use the same reference
HowTo: Basic Internationalization setup on drupal.org.
Since I find it almost impossible to remember every detail of the setup, I avoid any problems by following this guide step by step.
Working now....
go through this site http://localize.drupal.org/ and click on your language. Then download your language file (eg drupal-7.21.language-code.po).
Go to admin/config/regional/translate and click on the Import tab. Import the translation package you've just downloaded into the desired language. Go back to the Overview tab. Note the higher percentage for translated strings for the language you added. After that your translational works fine.
Please go to Configuration - Regional and language - Languages - Detection and selection, then enable selection by URL or Sesssion

Joomla article layout change base on navigation

I tried search lot on net but failed to got any solution.
Actually I want to change layout in my joomla article based on the user navigation.
For an example let say if user visiting iPhone Case studies & click on any case study(eg: Angry Bird) it contains the images/slideshow of angrybird project in iphone screen, while if the same article visit from iPad case studies page it contains horizontal image of ipad screen (Note: layout is changed).
To be short - I need the content & layout change in same article base on navigation or condition.
Is there any plugin or component which will help me to achieve this ? Any help will be appreciated.
Thanks
I think the easiest solution for this problem would be to use two different articles for each of the above said cases. That way you can easily style either of the cases the way you want. And by using one article for it, I see no particular advantage, as opposed to using different articles. If you see of any particular advantage please share it with us.
In any case if you want it to still use a single article, it seems to me that it would be a more complex solution. From what I know, there does not exist a plugin or component to cater your particular use case.
A quick and dirty solution, that comes into my mind includes the Jumi extension, which you can find here: http://extensions.joomla.org/extensions/1023/details . Jumi allows you to include PHP in your articles, etc..
You can then make an user-agent check and output everything as you need it for that particular device and for that particular article.
If you need different templates/layouts for both devices, I would recommend a theming framework, which does these things for you (applying different layouts for different devises). The T3 Framework from Joomlart does these things pretty well: http://www.joomlart.com/joomla/t3-framework-and-ja-purity-templates
I think the answer to your problem is 'Layout overrides'. Just create a layout override for the article component in the particular template folder you use for your inner-pages.
I think you should read through the following Wiki pages for a more clear understanding-
Joomla 1.5-http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Joomla 1.6(Should be applicable for 1.7 as well)-http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6
Hope that this solves your problem. Cheers.
I have seen another post here on Stackoverflow. Which says we can append page-class suffix to the tag. So as to style each article the way we we want, based on menu ids. This may be easier than a Layout override. Check out-
Joomla : How can we assign a different layouts to different menu IDs?

Codeigniter Multi-lingual language identifier

I am trying to implement CI uri identifier plugin - http://codeigniter.com/wiki/URI_Language_Identifier/
I set the code on a base codeignitor setup. The “ingore_lang” is set to “en”. I am using “alt_site_url” to generate alternative language links.
Now with english it is working all good, links are fine.
But when I click on any other language, the next set of alternate language urls is not replacing the abbr to the present link. For eg. if Spanish is selected, on the new page the link to italian language becomes:
mysite/es/it
I have also observed that the alternate language links never show “english” in the list. I assume they are still taking english as current language.
Please help, am I missing something? I applied the code to all specified files as guided.
Thanks
You should remove 'en' from the lang_ignore var, that should add english to alt languages list. Not sure about the es/it part...
Could you post the code of the implementation you used? I'm also using this in my application and it works fine for me.

Categories