My internal multilingual link point in wrong direction - drupal

Have some serious problem with links behaviour in my multilingual site (English (en) and Swedish (sv)). The default languages is English.
I have some nodes with a summery. In the summery I have internal links to my Swedish content. To link to page3 I use sv/page3.
I make a view with the summaries filtered on the language.
If I place this view as a front page all works fine but if I link the view from a translated Menu-link the will be sv/sv/page3.
Hope for help

Will adding slash sign at beginning help? Try using root relative paths instead of relative paths. So don't use sv/page3, but instead use /sv/page3

Related

WordPress responsive menu in chinese language

I am using this plugin in my wordpress website.
https://wordpress.org/plugins/wp-responsive-menu/
But when i translate my website in chinese language menu items not showing. Please can you suggets me how i can translate it?
in this plugins, the folder "lang" is empty... It does not use languages. So you need change php files and i recommend you do not do this.
But if you really need change, use sublimetext or other soft or command line for use best function : "search in folder".
Use WMPL[Multilingual Plugin].
Just install this plugin in your website and just translate each and every menu which has been used in English.{you can even Sync the menus to the selected language}.
When you choose your language the menu gets changed to Chinese language and nothing get affected.
You will most probably need to either change the page encoding or if use an approach like in this answer.
(HTML5) cannot display Chinese characters when using UTF-8

Use 2 languages on a single page

Is it possible in ASP.NET MVC to use 2 different languages on a single page, each with it's own resource file?
So for example I want the header of the page to be in english and the content in german.
Now there should be two dropdowns to change the language, one for the header and one for the content. If I change the header language to french the content should still stay german and vice versa.
Is this possible or not?
Just an update if anyone is interested.
There is a way to solve this problem.
In the example below the culture initially is set to german, then changed to english for the partial, and in the end, reset to german again.
This results in the partial being rendered with the english language, whereas the rest of the page is rendered in german.
#{
var culture = Resources.Resources.Culture;
Resources.Resources.Culture = new System.Globalization.CultureInfo("en");
}
#Html.Partial("Control")
#{Resources.Resources.Culture = culture;}
#Resources.Resources.welcome
With a custom helper method this would certainly look a bit more elegant.

redirect to a page is not working properly in asp .net which is inside sub folder

I have sub folders says X,Y,Z. I'm making menu list dynamically using 'ul', 'li' tags based on user rights. Inside 'li' tag i have 'a href="#"' tag. The tag 'a' filled from database dynamically.
The problem is the tag 'a' has link X/home.aspx. When i click first time this works since it is available. second time 404 page not found error arising. The link become X/X/home.aspx. Obviously this structure is not available. So, how to redirect.
Thanks
I don't know exactly how your href is continually being added to in this specific scenario (it's a bit of a pitfall in a number of areas, sometimes when using custom controls, etc.), however, you should qualify all of your links from the root by using a prefixed forward-slash (/, i.e. /x/home.aspx).
But we're not done, ASP.NET can transform these too, in other scenarios, so you might want to use the tilde+forward-slash prefix (~/, i.e. ~/x/home.aspx); this indicates the root of the virtual directory where the site is housed.
In this way, regardless of which level of the sites directories you are in, the links always refer to a full path, so to speak.
Your hrefs are relative from the page not from the root of your site...
So do not use "x/home" but use "/x/home".. or use "~/x/home"
Probably you are appending the directory.
If you click for 3rd time you get X/X/X/home.aspx?
Post your code in order to get more help.
Use Page.ResolveUrl
Page.ResolveUrl("~/x/home.aspx")

drupal language switcher unaware of the aliases? switches to node/XX/ instead of LANG/text

I have a big problem with the language switcher,
I have a multi language site that has every article in english and spanish , spanish being the default
so if one article is named :
domain.com/mi-articulo then the english one will be domain.com/en/my-article (using autopath is creating these aliases)
now this works fine if I manualy change the url.. but if I use the language switcher ..the english corespondent it's switches without aliases and Lang prefix
so instead of domain.com/en/my-article it finds domain.com/node/47 so as I have the menu and other things translated it makes drupal unaware of the language switched..
here are the screenshots to better understand what's happening (wierd behaviour)
ver1. spanish
ver2. english
now if i click on english ..look what happends (see url and content like drupal is not aware that this content is nor spanish nor english...because the language switcher doesn't find the aliases)
I had the same problem until I set the default 'Language domain'
in admin/settings/language/edit/en. Now the module is working as expected.
I stumbled upon the same issue today.
All nodes had been imported from another site. All translations were imported, but not the relationship between them, so if you edit a node and check the translations, you may notice that your node doesn't have any given translation.
If this is your issue, you may use the functionality to add existing nodes as translations.
I have the same problem with the language switcher; just cannot get it to do what it's supposed to do. I ended up effectively writing a very simple version of it by adding a block and inserting the following html:
<ul>
<li class="first en">English</li>
<li class="last fr">Français</li>
</ul>
It is limited in that it always takes you back to the homepage after a switch but once that's done, links to other nodes continue correctly with /fr in the url.

Joomla css path

I'm having a problem whit this website i'm building - www.bodyheat.uk.com .
The first page (home) appears as i "wrote" in the css, but in the other ones the webpage it seems that the webpage cant call the css.
Anyone can help me on that?
TRICAT answered this
"You must have the base of your urls in the pages wrong because the css and js are using a relative url including the name of the page..
/joomla/index.php/templates/system/css/system.css
And obviously it should be:
/joomla/templates/system/css/system.css
The www.bodyheat.uk.com works because it doesn't have a page name behind the url."
But where I can change it? In what file? configuration? I saw what you said but dont know where to go to change it :(
THANKS ALL!!
You must have the base of your urls in the pages wrong because the css and js are using a relative url including the name of the page..
/joomla/index.php/templates/system/css/system.css
And obviously it should be:
/joomla/templates/system/css/system.css
The www.bodyheat.uk.com works because it doesn't have a page name behind the url.
I had this problem as well when I was creating a custom template. In the Global configurations, under SEO Settings, I turned OFF 'Search Engine Friendly URLs'. This fixed my problem.
Thanks!

Resources