Can't translate block in Drupal - 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.

Related

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

Dnn 2sxc Blog Module sub-directory

I am testing out DNN 8 and am using the blog app and content management from 2sxc (great module, BTW!).
I have the recent blog post listed on a page sub-directory called '/articles'. But I also wanted some of them listed on the home page as well. When I add the app or module to the home page the url is '/home/post/post-title-here' while on the /articles page the urls are '/articles/post/post-title-here'. This creates the illusion that I have two directories with duplicate blog posts (which probably will get me some dings for SEO for duplicating the same content).
How do I get the app to use the common directory '/articles' regardless of where I put the module/app on the site? I've looked at settings all over and don't see anything that pops out at me. Also not sure if this is a DNN setting or a setting specifically to the extension. Finally, I'd like to be able to keep the year/date/month parts of my url as well as they were on the old site. I assume making that change would probably be similar with the solution to my original question. If that's a different fix, then let me know and I'll put it into a new thread. Thanks in advance!
This question is basically about the blog-app. Now if I understand you correctly, your question is "Can I have multiple lists on various pages, but all of them still link to my main details page". The answer is yes, but the exact solution depends a bit on what you need.
So basically there is a setting in the app-settings to define the main page. I believe it's empty by default, so that the blog-app works automatically without you having to configure anything. But AFAIK if you set that, all blog-details-links will use that as the only source.

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.

Drupal: best practice to arrange various Drupal entities into one site /subsection

It's perhaps a common task to create a subsection on site, which will reside under sitename.com/subpath.
The subsection will contain own menu with a few links (Calendar view, Add MyEvent content type form, Table View).
But clicking these links will lead out of this /subpath.
Is there a know solution for this (to stay in subsection)?
Or it's normal to use custom code to manage such a subsection, e.g. create pages under /subpath with custom PHP code that will load CCK forms (drupal_get_form())?
Also, is it a tolerable solution to modify from "View links to node forms" to "View links to /subpath pages with programmatically created node forms"?
I'm not sure I completely understood your question - if I didn't and I'm off-topic, I apologize in advance.
Anyway:
Creating pages with code in them using PHP filter, is never accepted practice. There's a reason why the filter was moved to its own module in 6.x - so you can turn it off altogether.
You can go to Site building->URL aliases->Create alias and point the wanted system paths (say, node/add/mycontent) to your subsection path (say, mysection/add/mycontent). All the links to the system path should change to the new alias.
EDIT:
Also, check out pathauto and Sub-path URL Aliases for paths like node/1 and node/1/edit

Resources