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?

Comments

zirvap’s picture

Status: Active » Fixed

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.)

claudiu.cristea’s picture

StatusFileSize
new1.98 KB

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:

  1. Redirect the page translate/projects/<project_name> directly to translate/languages/<unique_language>/view?project=<project_name>
  2. Redirect the page translate/languages directly to translate/languages/<unique_language>

... when there is only <unique_language> defined.

claudiu.cristea’s picture

Title: Limit languages » Fix language picker if there is only one language
Version: 5.x-1.x-dev » 5.x-1.0-alpha3
Component: Miscellaneous » User interface
Assigned: Unassigned » claudiu.cristea
Category: support » feature
Status: Fixed » Needs review
StatusFileSize
new2.78 KB

Patched TODO 2 from #2.

claudiu.cristea’s picture

StatusFileSize
new3.22 KB

And, finally, TODO 1 from #2. The attached patch contain all changes...

brmassa’s picture

Status: Needs review » Reviewed & tested by the community

Claudiu,

nice patches. working.

Very useful while its not on drupal.org.

regards,

massa

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

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!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.