Language switcher Block is not working in drupal - php

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

Related

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!

Website translation onload

I have a dating site which is currently in English language.
As per client requirement he told me to convert the website in Polish language.
If I will create language file for the website, then I need to rework on whole project.
Is there any technique so that my website is automatically translated into Polish language when it is loading in browser. There also some hidden div's that will be displayed when a specific event occurs.
The website is created in php with smarty templating.
Please help me for this.
Thanks
If you want a custom solution, you're going to have to do some editing of your current code.
Option 1
Store all your strings in YAML files or within a database, or flat file, or however else you want them stored. The fact of the matter is that, as soon as your application loads, it'll query the database for the strings in your language (your url will have /en, /fr, /de etc at the end) and place those onto your page.
This means you'll have to code the retrieval of this data, and placement within your application.
Option 2
Use Google's "Auto Translate" as per Dainis' suggestion in the comments. This isn't as customisable, but means you don't have to do any reworking of your current code.
Option 3
Use Bing's translate API and manually request strings for the data you want translated on each request. Access to the Bing API is free for developers and has loads of free translations included - but this will be data intensive unless you cache the translations for future use.
With Option 3, you'll still have to code your own custom solution. So if you're on a tight deadline or you're just plain lazy, go with Option 2.

Switch Two Language In Wordpress

Now I am Working on a Wordpress Project. and my problem is in my project site must work in two language Like this If i select one of this language site Must Change the language as i select please help me to find a solution :'( (I wont need a plugin because its not change it proper )
You say you don't need a plugin, but WPML is cheap and the best at doing this, by far. I have used it personally doing client work and it is the best multi-language plugin for WordPress I've used.
I am using gtranslate plugin only and it is working very well. It has Translations between 58 languages with the support of flags.
In the settings panel of this plugin, put translation "on fly". Then it will not reload the page for translation.
Just Try it. Cheers!!!

Joomla Multiple language

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

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