Support MemHT, Vote Now!
MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
Moderators: mem paulo89 adminik
Page 2/2 < 1 2
RSSReply
Navigation bar by Language
AuthorText
Iconoclast
Junior Member
Avatar

Posts: 73
Contributes: 49

Gender: _MALE_
Online: No
Date: 22/07/2008 10:30
Re: Navigation bar by Language
#post10403
Well as it is now, the page names are in English only. By making the code check the 'currently' selected language file for a definition, (which would be added by the end user in each language file they use on their site, rather than just adding it in 1 language via the Admin page), it gives the end user an option to add the page titles to the language file. If they exist they get used, if not the defaults are used. I'm not sure how this would slow MemHT down.
Delete Edit Quote
 
mem
MemHT's Dad
Admin / Developer

Avatar

Posts: 3886
Contributes: 1161

Gender: _MALE_
Online: No

Languages: English, Italian, Macedonian, Serbian
Date: 22/07/2008 10:37
Re: Navigation bar by Language
#post10406
It would slow down MemHT because there are 22 languages, that means at least 500 of page rows (an average, probably more) loaded each time a page is opened.

If i create one row instead, something like Default + Customized, than customize directly default ones and that's all. I mean, it's not an operation done every day... maybe once, when installing the cms
Image
MemHT Portal - Free PHP CMS and Blog

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson

READ THIS before posting your support question in the forum!
Delete Edit Quote
 
Iconoclast
Junior Member
Avatar

Posts: 73
Contributes: 49

Gender: _MALE_
Online: No
Date: 22/07/2008 11:11
Re: Navigation bar by Language
#post10410
Only 1 language is selected by a user in each instance, I thought it was a simple if/else. The only values in the db should be the defaults, as currently.

If the language entry exists in the users selected language for the page title, show it. If not, use defaults.

Being English, I'd be using the English language file by default. If I choose to add define("_GALLERY_", "Gallery"); to that language file, and the code was written to look here first for the definition, if it was found, it would be used. If not, it would use the default. The default language would be the same in English, but not in most other languages.

I'm not much of a coder, but I have seen this logic implemented elsewhere, (phpBB I think) and I still don't see how it would equate to 500 page rows. I'm not saying you're wrong, just making sure you understand what I'm saying in case you didn't :)

It just gives an option for each Administrator to add page titles to the language files they use. If they don't exist, normality resumes.

I truly thought this would be nothing more than a simple if/else statement in the core, and wouldn't need to touch the database at all. The rest is down to the Administrator :)
Edited: 22/07/2008 11:27
Delete Edit Quote
 
mem
MemHT's Dad
Admin / Developer

Avatar

Posts: 3886
Contributes: 1161

Gender: _MALE_
Online: No

Languages: English, Italian, Macedonian, Serbian
Date: 22/07/2008 11:36
Re: Navigation bar by Language
#post10414
I understand you, but why forcing and admin to edit files to translate pages when he can do it in admin > pages online? I mean, it's the same thing. And what about not defined pages? I need the database again and we're at the same point Smile

What you say would be useful if a site has separated content for each language, but if a site is in german and doesn't have those separated contents, i don't care if the page is called impressum or disclaimer, i just don't know german and i don't care about page names lol

Anyway thanks for the idea, one day maybe MemHT will have completely separated content, at the moment is too much work for me Smile
Image
MemHT Portal - Free PHP CMS and Blog

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson

READ THIS before posting your support question in the forum!
Delete Edit Quote
 
Iconoclast
Junior Member
Avatar

Posts: 73
Contributes: 49

Gender: _MALE_
Online: No
Date: 22/07/2008 11:43
Re: Navigation bar by Language
#post10415
It's not forcing anyone to do anything, they can stick with the defaults they enter in the Admin Panel. However, if they wish to add multi-language support to the Navigation Bar, by adding the relevant entries (not hard to do really) to the language files they want to use will allow them to do this for x amount of languages, rather than just the default in the ACP/DB.

Anyhow, I understand what you're saying about the separate content, and hopefully one day this will happen, but with respect, this thread was about the navigation bar, and not the content :)

Most of the other 'non-content' areas of the site have multi-language support, and if this is a simple if/else as I believe, it would be a simple solution for those who wished to do so.

All added pages will be defined in the ACP ( default title in default language), so what would be an undefined page?. For additional languages, you just add an entry for those pages in the relevant language file/s.

If page name = nav_title, then hello.php = define("_NAV_HELLO_","Bonjour"); - Obviously this is some extra code again, but I can't see it being much code, nor intensive with regard to slowing the site down.

If a user selected the French language file, it would pick up the title from the French language file (if the entry existed there of course). Else it would default to whatever was stored in the ACP/DB.

I'm certainly not pushing for this to happen, just thought it might be the answer for those who would like the option for consistency.
Edited: 22/07/2008 12:20
Delete Edit Quote
 
Zion
Junior Member
Avatar

Posts: 27
Contributes: 29

Gender: _MALE_
Online: No
Date: 31/07/2008 18:03
Re: Navigation bar by Language
#post10738
Hi guys,
I'm kind of need this feature i guess.
I'm using Hebrew language as my default language on the site. The main problem for me is that the pages name is showing in english on the path "where you are right now" above the main page (under the header). on the navigation block i used "Links" instead of "Pages", and gave the same page link for each page.
Also i tried to rename the page names in the SQL table, but with no luck, it was installed with "latin1_swedish_ci" encoding, that doesn't support hebrew chars, it's showing just question marks (?). I tried to change the encoding too, but with no luck.
Also, the users won't be able to register to the website with hebrew nicknames, and that's a problem.
If you have any solution for me, I would like to know about it.
The website is www.shafan.net, using linux server, and memht version 3.9.0.

P.S:
even when i changed the site configuration language to hebrew, it's still writing to me "Default language: English".


Edited:
I found how to change it in the admin control panel (the names of the pages). The problem with registration with hebrew nicknames is till on ("user doesn't exist" error when trying to register).
Edited: 01/08/2008 02:18
Zion.
Delete Edit Quote
 
Reply
Page 2/2 < 1 2
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Search
Users Block
Hi Guest
IP: 38.103.63.60

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo