LinguaPlone - link to available translations only - plone

When using page translations in Plone (v4) with LinguaPlone product (v4.1.2), links to all available languages selected in LinguaPlone settings (/<PORTAL>/##language-controlpanel) are generated. I wonder if it can be configured to link only to available translations for the page (excluding the current language from the links as well). I can't see any relevant options even in /<PORTAL>/portal_languages/manage_configForm.

you'll have to customize the plone.app.i18n.locales.languageselector viewlet and adapt the available method to only show those languages where there is a translation for (context.getTranslations)
however, this will prevent visitors from switching to another language of the portal in case there is no translation to this language for the current context.

You should use http://pypi.python.org/pypi/collective.portlet.lingualinks addon for that.
The global language switcher is in the head to display languages supported and should not be used to navigate between translated content.

Related

Symfony change website's language

I am building a website using Symfony. I am wondering how can I change the language of my website by pressing a button.
Say I have two links in the footer (English and German) and when I click any of them, the whole website and all future views I access will remember my choice of language.
There are numerous websites who have this facility and I am wondering how can I achieve this goal.
Thank you!
Recommend checking out the jms/i18n-routing-bundle. You can use buttons or links to change the locale (language) and once changed the site will remain on that language. Just a bit of advice, use the "prefix" strategy when you set it up so that your site's urls will always be domain.com/language/.....
You'll have to learn how to use the translation bundle and setup translation files as well as having to learn how to setup Twig for translations, using the translation in your services and forms, but once you get the hang of it, it is really easy but time consuming.

Sitecore Multilingual Setup

I could not find a single official document on setting up and using multilingual on Sitecore SDN.
Basically, we have a requirement to enable couple of our multi-site Sitecore website to support multi-lingual i.e. Chinese Mandarin and Japanese.
Based on geoip of the visitor or some questions, we need to display either English or Mandarin or Japanese for couple of pages on site.
Given that I'm quiet new to multi-lingual set up, could someone please help me below:
Sitecore setup:
What exactly do I need to do in terms of Sitecore IA setup? Create separate page for each languages?
How will content author author the english, japanese and mandarin for the same content pages?
Do we need to install any language translator such that content author will type in English and it will get translated to Mandarin and Japanese during run time?
Is it possible that user can type in Mandarin or Japanese in Sitecore CMS?
Sitecore Experience Editor:
How will user author in Mandarin or Japanese languages using Sitecore page editor?
Coding Changes:
We are using ASP.NET MVC, do we need to make our content repository smart such that it will get content from Sitecore in specific language e.g. pass language or similar?
I googled on above topic as well, but could not find any legitimate result.
Thanks.
Your post is really broad. Below you can find high level answers to your questions. If you need any more specific answers, try to be more precise and post separate questions.
Sitecore setup:
You need to add selected languages under /sitecore/system/Languages node
Then you need to select chosen language and click Add a new version:
Your content authors will be able to select chosen language version and edit it
Sitecore doesn't have any automated translation out of the box. There are some code samples and modules which can help you with that. Ask google for it, e.g. https://www.google.com/search?q=sitecore+translate
Yes, user can type Mandarin or Japanese or any other language.
Experience Editor:
In Experience Editor authors can switch between languages in the Experience tab of the ribbon:
Coding Changes:
For automated language selection based on user IP, you need to use some GEO IP provider, e.g.: https://www.google.pl/search?q=sitecore+geo+ip, for switching the languages manually, create language selector, e.g.: https://www.google.pl/search?q=sitecore+language+selector
Remember that Sitecore 8 related documentation can be found on https://doc.sitecore.net/ or https://kb.sitecore.net/
To make language resolution work based on user IP you may replace
<processor type="Sitecore.Pipelines.HttpRequest.LanguageResolver, Sitecore.Kernel"/> with your implementation where you do resolve languages based on IP lookup.
With miltilinguality In Sitecore, you will still have the same items, but some of the fields will be versioned (having their own version for each specific language).
When authors create content - they are able to switch between languages from your ribbon.
From UI point of view, the language will be take out from exact user settings, that also includes Page Editor (in sample below user has German languguage set):
Few more links to read:
http://www.newguid.net/sitecore/2012/adding-ip-lookup-to-language-resolving/
http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2011/05/spoof-an-ip-address-to-test-geoip-with-the-sitecore-customer-engagement-platform.aspx
For most multi-lingual strategies, it is also recommended to have a fallback strategy so if an item does not have a version in the current context language, the user will still see something, even if its in the default language (probably English). I have a custom solution in which you can model after in my blog post:
http://mrstevenzhao.blogspot.com/2015/08/sitecore-custom-language-fallback.html

Drupal: Translating the Contact-Form

I want to use the default Drupal contact form for my website, but the labels("Your Name","Category") are in english an I need them in german.
Maybe I'm blind but i couldn't find a way to edit these labels.
So I googled it and found this Module: https://www.drupal.org/node/1396984
I installed the module and followed the guide, but it seems that I can only localize the categories or the auto-reply, because I still see english lables.
Am I doing something wrong, or is there just no easy way to change those lables?
thanks
I'm using the latest Version of Drupal 7.
You need to install the i18n module - https://www.drupal.org/project/i18n (if you haven't already). Then you can translate those strings ("Your name","Category") from the translate interface located at http://yoursite.com/admin/config/regional/translate/translate *
Note: If the strings don't appear in the translate interface try displaying the page containing them (the contact page) in a language other than the default one. This will register them for translation.
* replace yoursite.com with the address of the site you are developing
P.S. If you are going to make a multilingual site, I suggest you enable all relevant i18n submodules and import the drupal core translation for the languages you need from https://localize.drupal.org/translate/downloads
I believe what you need is the Localization client.
https://www.drupal.org/project/l10n_client

Forcing English as admin interface language on LinguaPlone sites

We are hosting multilingual Plone sites. The default Plone behavior is to use the current content language for admin interface labels. We'd like to change this behavior so that admin interface language is always English, regardless of content.
This will make managing multilingual content easier if you have little or no target language skills.
If we can set this so that when you login as admin and are member of certain or have certain role, the behavior kicks in.
Any suggestions how to do this?
You can register your own INegotiateLanguage multi-adapter from Products.PloneLanguageTool to allow for customisation. IIRC (it was a while ago I added that multi-adapter) you can just register it as an adapter on your own plone.browserlayer interface, though I'm not absolutely certain the browser layer gets applied early enough.
The correct way is to override language when i18n translation machinery queries the string for plone or other i18n domain providing admin text strings.
Overriding request.LANGUAGE has side-effects which will make your site unusuable. E.g. folder listings won't work.
Here is a package which does what you want:
https://github.com/miohtama/silvuple
we had the same requirement and solved it by adding a javascript for managers, replacing the the strings. not ideal because of the redundant vocabulary/dictionary, but worked fine for us.

CMS with support of Multilingual and custom url rewriting

I'm searching a CMs that can offer me these features :
Localized fields with a custom number of languages
Each article belong to a category that may have parent categories
language and category could be calculated from url example /en/maincategory/subcategory/my-article-url-rewrite
I was looking in drupal for these features. I haven't yet found something on localization. I have found another solution that could satisfy my need which is Plone but I can't decide which can can give me what I want. Can Drupal do all this ? Plone ? Or there is another solution ?
Plone seems quite a good choice for this project.
Localization can be handled using the excellent product LinguaPlone;
Hierachical categories can be handled using collective.virtualtreecategories, or using hierarchical vocabularies and a custom field with a collective.dynatree widget (I did something similar in a recent project);
Plone does not retrive content using URL dispatch, but path traversal; however, using correct content placement inside folders, you can have a directory structure that complies with your format.
Of course, you will also have access to Plone's powerful User and Group management facilities, ACLs, workflow engine, and many other features.
If you are knowledgable in Python, you might also want to look at Django, which is more like a framework than a CMS, but hey...
Yes, eg. Drupal 6 is able to do that. Just take a closer look at modules:
i18n (shortcut for "internationalization"),
Locale,
Language Icons,
Pathauto,
Transliteration,
etc.
There are a lot of tools for that.
To look for multilanguage-related modules, just follow the link: http://drupal.org/project/modules?filters=tid%3A97%20drupal_core%3A87%20bs_project_sandbox%3A0&solrsort=sis_project_release_usage%20desc
Drupal even provides translation files for its interface and some modules have translation of their interface bundled in the installation files.
If you only need the features you specified, the only thing you need is to install modules you choose, change the default configuration if needed, and you are able to do what you planned :) Drupal has some administration interface that is not friendly to new users, but it is surely able to quickly fulfill your requirements.
If you're using a fixed list of categories and sub-categories then all of your requirements are standard features of the eZ Publish CMS available at http://share.ez.no
If they are not a fixed-list then you may need to create a bit of custom code.
That CMS also uses Zeta Components

Resources