Fix language picker if there is only one language
claudiu.cristea - March 9, 2008 - 12:05
| Project: | Localization server |
| Version: | 5.x-1.0-alpha3 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | claudiu.cristea |
| Status: | closed |
Description
How can I limit the server to only one language? I plan to setup a country-based l10n server and I don't need only one language...
Or how can I delete the other languages or prevent them appearing on "Pick a language" dropdown (on translate page) or on translate/languages page?

#1
You go to admin/settings/locale/language/add and add the language(s) you want to translate. Only the languages you add will show up on the translate pages.
(I'm setting this issue to "fixed" -- if my answer didn't solve your problem, please set it to "active" again.)
#2
Well... finally I found that when l10_dupalorg is installed the locales_meta table is filled up with all languages known by Drupal... I think that this must be an administrator's task in the future. He must be able to add/remove languages from l10n_server. But this could be a subject to another patch...
I changed the name of the issue and I made a patch to handle the case when there is only one language. In that special case we don't need any radio or dropdown box for language choosing.
TODO:
Redirect the pagetranslate/projects/<project_name>directly totranslate/languages/<unique_language>/view?project=<project_name>Redirect the pagetranslate/languagesdirectly totranslate/languages/<unique_language>... when there is only
<unique_language>defined.#3
Patched TODO 2 from #2.
#4
And, finally, TODO 1 from #2. The attached patch contain all changes...
#5
Claudiu,
nice patches. working.
Very useful while its not on drupal.org.
regards,
massa
#6
claudiu.cristea: I have committed a slightly modified (commented, code style improved) version of your first patch.
The reason is that I do not share your view that people should be redirected from the language overview and project summary pages. The language overview provides a status overview of any language set up, and this information is not available anywhere else on the site, so if we redirect people from there, then we make this information inaccessible. The same applies to the project summary page, which lists project information not available anywhere else.
Thanks for the patch!
#7
Automatically closed -- issue fixed for two weeks with no activity.