Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 10:47:05 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155529 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Newbie- language page issues!  (Read 1021 times)
zombies

Offline Offline

Posts: 8


« on: December 04, 2009, 02:54:32 PM »

Hi

Good CMS but.........

I have just installed it, got used to the layout etc etc

I have made 4 pages

en (lang english)
page 1 (en parent, lang english)
page 2 (en parent, lang english)

fr (lang english)
page 1 (fr parent, lang english)
page 2 (fr parent, lang french)

I am using the default template and it is showing
en
Page 1
Page 2

fr
Page 1

Why is it not showing Page 2
Is this because my  PC is UK, would it show up on a French PC / IP

Cheers
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #1 on: December 04, 2009, 03:04:54 PM »

beause of the language setting ... the default language of your installation is EN ... so it only shows the EN pages of your installation. If you set it to FR it will only show the FR page(s) ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

zombies

Offline Offline

Posts: 8


« Reply #2 on: December 04, 2009, 03:11:53 PM »

so what is the point of having page languages (in settings)and a multi language site if it only shows the installed language

I changed the language in default settings to francais and showed the same page links

Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #3 on: December 04, 2009, 03:25:24 PM »

I forgot to mention that it also depends on your profile setting ...

The whole page language is a well known issue (the fact that it's not working like designed). Currently there is no outlook as of when it will be.

Have a look here please: http://help.websitebaker.org/pages/en/advanced-docu/designer-guide/multilingual-websites.php

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #4 on: December 04, 2009, 04:16:02 PM »

When you log out everything will be ok. This is because in your preferences you set your language to EN, so when you are loged in, you cant see page with french language.

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
zombies

Offline Offline

Posts: 8


« Reply #5 on: December 04, 2009, 05:44:04 PM »

Still same logged out!!!

have just been away from the PC, come back booted up, site is showing under consrtuction !!!
and in French

Klaus - I did look at that first yesterday but I don't want an intro page, I have created 2 flag links but these only work if the main page names are kept the same, if they are changed then the flag links are useless
« Last Edit: December 04, 2009, 05:48:15 PM by zombies » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #6 on: December 04, 2009, 07:53:24 PM »

Intropage: not required ... the rest is just menu setup and structure ... and has been addressed in the forum as well. Please do a search for "multilingual".

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

zombies

Offline Offline

Posts: 8


« Reply #7 on: December 04, 2009, 09:16:53 PM »

Appreciate the replies

I actually made my own links in the header (index.php) with flags and directed them to the relavent files
eg. click french flag goes to /pages/fr.php

but this isn't the object of the CMS, it does it for you, I haven't been able to find a proper solution as yet

the thing is, in the page settings the options are
Target:     
Template:    
Menu:    
Language:    
Searching:

so if you change the language option to another (French), going off the reply earlier it only works if the website language is changed to France in admin!
I dont see the point in that

The fact is, I set a page language to French and it doesnt show up, logged in or not

i'll keep looking for a solution for that

in my browser page source is this -
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

this is why I wanted the language options
for SEO the lang will need to be relevent to the content

without going back (again) to dreamweaver to edit this, is there another way to not show the lang
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #8 on: December 04, 2009, 09:53:38 PM »

I suggest you look at the helppgaes ... the answers to your questions are posted there. You need to be willing to understand them though ...

1) Language Flags:
Quote
Hide the container pages (parents)

To hide the container pages English and German from the navigation menu, one needs to change the variable $start_level of the show_menu call in the index.php file of your template. Changing the variable $start_level from 0 (show menu from root level e.g. English and German) to 1 (start menu from level: root +1) hides the container pages. Change the following line int the index.php file of your template

<?php show_menu(); ?>

into:

<?php show_menu(1, 1); ?>

If you use multiple menus, the first parameter of show_menu may be adapted according your needs. Read the variable description of show_menu() for further information.
Allow language change from any displayed page

To allow your visitors to change the language from any displayed page, one needs to add an additional show_menu() call function to the index.php file of your template. If you have sticked to the page structure shown in Figure 1 above, all container pages are on the root level. To show only the root level pages, one needs to modify the 2nd ($start_level = 0) and 3rd function variable ($recurse = 1) of show_menu.

To add a text link with the menu titles (EN, DE) of the container pages, add another show_menu() function call to the index.php file of your template.

show_menu(1, 0, 1, true, "[a][menu_title][/a]", '', '', '', false, '', 0);

If you want to add a flag symbol for each language instead, use the following code.

show_menu(1, 0, 1, true, "[a]<img src=" .WB_URL .
  "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);

The code above assumes that the flag symbols are uploaded via the WB backend to the folder /media/flags. One needs a symbol flag for each supported language. The flag symbols must be named as the menu titles (e.g. EN.gif, DE.gif). Depending on the server operating system, the flag symbols are case sensitive. This enables the visitor to change the language by clicking on the flag symobl.

2) Language for the Namespace

A bit more difficult, but this:

Quote
Meta tag charset

The following meta tag defines the default charset used by the browser. This entry is essential as it provides information about the encoding of the characters contained in the index.html file. If the charset used does not fit to the WB settings, the characters may be displayed wrong.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Replace the line above located in the index.html file with the PHP code shown below.

<meta http-equiv="Content-Type" content="text/html; charset=<?php
if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else
{ echo 'utf-8'; }?>" />

together with a look at the variables and constants:

Quote
Other Constants      Description:
PAGE_ID     page identification number of current displayed page
PAGE_EXTENSION     page extension of current displayed page (e.g. .php)
PAGES_DIRECTORY     pages directory of current displayed page(e.g. pages)
MEDIA_DIRECTORY     name of the media directory (e.g. media)
LANGUAGE     language of current displayed page (e.g. EN, DE)
DEFAULT_LANGUAGE     default language (e.g. EN)

might give you this result:

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo LANGUAGE;?>" lang="<?php echo LANGUAGE;?>">

btw, all the quotes above have been copied from the helppages. I admit, for the code you'd have to dive a bit into WB ... but not unnecessary deep in my opinion.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

zombies

Offline Offline

Posts: 8


« Reply #9 on: December 04, 2009, 11:26:45 PM »

Replace the line above located in the index.html file with the PHP code shown below.

Huh?

Obviously an error with the template as it has both
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
&
<meta http-equiv="Content-Type" content="text/html; charset=<?php
if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else
{ echo 'utf-8'; }?>" />

I will have to go back and use the original template until its sorted

Also the link for help on the latest release doesnt work http://start.websitebaker2.org/help/2.8


I also think its better to have stickies on the forum rather than just reading through the help section, then FAQs can be seen easily.
« Last Edit: December 04, 2009, 11:40:51 PM by zombies » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #10 on: December 05, 2009, 12:01:21 AM »

Please DO read the help pages ...

and the other thing ... http://project.websitebaker2.org/ticket/813

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!