URL alias for language frontpage - drupal

I have set Drupal to determine the language from the URL (path prefix), thus / is english and /da is Danish.
This works fine for all pages except /da
The frontpage for Danish is /node/14 but it doesnt show when I go to /da
Also content marked Language neutral is not showing for any language.
Any ideas?
p.s. I'm using Drupal 7.0 Alpha 2

As I know in D6, you can insert a record into {url_alias} table and everything will be ok then.

I don't think core has the ability to set an individual front page for each language. You'd have to use a module like http://drupal.org/project/i18n, which has yet to have any work completed with porting to Drupal 7.

Related

having multiple language switchers in a single node for Drupal 9

So I am still getting the hang of drupal and i would like to know if this is possible.
I want to have 2 language switchers in my site. One is for the whole site. the other switcher will be exactly in one of my content types and it should only translate the content and nothing else.
So the main language switcher will translate the entire site based on URL. The second language switcher should only change the content. Is this possible? if so then what is the best way to achieve this?
I am using Drupal 9.

Change hardcoded default front page - Drupal 8

I need to change the hardcoded part of the default front page shown in below screenshot
This may be easy, but, the part http://www.website.com is hardcoded, how it can be changed?
FW: Drupal 8
OS: Centos 7
WS: Apache
DB: Mysql
Answer will be: you don't have to change that part.
It's not hard-coded. Drupal can detect current domain so if you move site to different domain this part will also change to correct one. Good thing with Drupal is that it keeps paths in relative formats so when you move site to new domain they will work out of box (unlike i.e. WordPress). Just make sure that urls you enter manually (i.e. links which are part of some wysiwyg edited content) are also in root relative format.
As per #Milang Accepted Answer, Here I found a practical example Drupal default front page URL is not hardcoded.
You can find the example here

Can't translate block in Drupal

I am building site in Drupal and I need your help. I have an assignment to make one more language translation of the site, and so far so good. However, I have one trouble with one block which isn't going to get translated, even though in the settings I translated it.
Also one strange activity I noticed is that when I try to go to VIEW section of all the other languages, I get dropped to front page (where that block is actually located) but if I press VIEW from my language translation (Swedish) of the block I get to completely new page.
If I go to front page and my language is selected, that block is actually using default language.
Any help what may cause it?
For desire url aliasing you need to install pathauto drupal module. then you can configure alise from below url
admin/config/search/path/patterns
OK, I have found a solution to this problem.
It appears that Drupal 7 by default sets your new language homepage to the default homepage and that's why this block was using default language since it was relying on the front page. Anyway, to fix the issue follow the steps:
Login to adming account, go to Configuration, System, Site Information and in the field Default front page for the language you have chosen navigate to your specific node page. That's it.

Can plone.app.multilingual work for partially translated sites?

I'm trying to get plone.app.multilingual to work with a site which is currently in English, but will become partially translated. I'm using plone.app.multilingual rather than the more familiar LinguaPlone because of Dexterity content types used by the site which LinguaPlone does not support.
I have a test site to play with. As soon as I translate one page it seems to create a /en folder for the English content and (e.g.) /fr one for the French. I can switch back and forth between the two language variants of the page, but once I'm in the French language I can't see all the other English pages. As a site visitor this is no use and it ignores the fact that although a browser may be set to prefer French, it might also accept English. I have selected what I believe to be the relevant options to allow fallback to the default site language and it lets me view them if I know the URL of the page, but that's not much use if I don't see that the content is there in the first place.
Can plone.app.multilingual be made to work in such a way that a user can see a page of content in some language even if it's not their own, or is my only option to convert the site to use Archetypes?
Thanks.
LinguaPlone would handle this case the same way: Make all content 'language neutral', except for where there is a translation.
By marking all your content 'language neutral', it'll be found and displayed to the end-user no matter what language preference has been set. Now, if any of your content does have a translsation, you do need to set English as the language for the original version so that it'll only be displayed when English is selected.
To do this, you probably can use a subscriber to the plone.multilingual.events.IObjectTranslatedEvent.
As for the creation of en/ and fr/ locations for your content, that's the task of the ITranslationLocator adapter (from plone.multilingual.interfaces, you can override that adapter to provide your own choices. See the default implementations for how this currently works.

Is it possible to translate view path/title of custom content type?

I'm a newcomer to Drupal.
I have a Drupal installation with i18n module.
Everything works perfectly however I faced one issue.
I created custom content type and a view to display it. Now I have a quesiton... Is there any possibility to translate view path/title?
Regards,
DaveW
Well known issue for all people starting their adventure with Drupal.
How to solve the problem? It's very, very simple. I presume you have your languages created and enabled - I'll use English as default language.
Create your view with requested title and path. I always use English language as the first language, ie. news.
Go to Administration » Configuration » Search and metadata » URL aliases and create new alias by clicking Add new alias link (if this module is disable you need to enable it).
From dropdown menu, select your second (or third etc.) language, in my case Polish.
In Existing system path field provide the English path of the view you created: in our case it's news.
In Path alias field provide your translation, ie. wiadomosci for Polish language.
Voila. Now, when Polish is the current language, it will use an alias wiadomosci for news path.
Note: Just tested on fresh latest Drupal installation - works perfectly.
If you take a look here:
http://reyero.net/en/drupal/drupal7_i18n_beta1_overview (This is the module author's page)
He shows options for enabling translation of taxonomy terms, which would be the path up to your actual page - such as categories you've set up for your content.
There is also a tickbox for node, which would be your content. One would think that this would translate the either the url or the node content.
His site doesn't seem to translate to the url to spanish, but just changes menu items. The URL falls back to the node number instead of the alias which was previously displayed.
Maybe this helps or maybe this is already obvious to you, but I would tray playing with those options.
Nice overview - http://evolvingweb.ca/story/drupal-7-multilingual-whats-new-i18n
Path Translation
The Drupal 7 Path Translation Module allows you to create translation
sets for paths. Path translations are used for generic paths (for
example, for views pages), not for node or taxonomy page paths. You
can configure multilingual paths by going to Configuration » Regional
and language » Translation sets » Paths.
Seems to imply that there is a way to translate the nodes - not sure if you have to hard code or if it will happen automatically - looks promising though.
This guide might be helpful as well: http://drupal.org/node/133977
The easiest way seems to be to go with the Internationalisation Views module: https://drupal.org/project/i18nviews.

Resources