Gossamer Forum
Home : Products : DBMan SQL : Discussion :

DBMan SQL 2.0.3 Beginner

Quote Reply
DBMan SQL 2.0.3 Beginner
Hi,

I've just downloaded DBMan SQL 2.0.3 and am trying to understand how everything works. It's so different to DBMan SQL 1.0.1.

I would appreciate it if someone could answer the following questions -

1/ In the Sample database that is installed during setup I can't find where the error message "Column price cannot be left blank." comes from. I assumed that all the user messages can be changed in the User Language template but I can't find that particular message. Where can I find it if I want to change it and are there other user messages not in the User Language template?

2/ If I set up multiple language templates, how do users call up the different templates. I have read through a lot of GT posts (mainly Links SQL) and I think I understand how to set up multiple template sets but I don't know how to call them up. Does DBMan SQL 2.0.3 use page.cgi?

3/ When installing DBMan SQL 2.0.3 a lot of directories and files are installed. Which ones can I remove?? e.g homes, image_gallery, etc. DBMan SQL 1.0.1 only uses 3 or 4 files but it appears that DBMan SQL 2.0.3 relies on many many more. What files are actually required?



4/ How do you add categories to the Language template sets?

5/ Is it possible to translate the table contents into different languages? The table contents will always be in English but I want to translate the results that users see into different languages. E.g if the table field is "RED" I want the user to see "XXX" (RED in Japanese or another language). How would I set something like that up? I did it with DBMan SQL 1.0.1 using seperate language files that translated the table fields depending on the users language.

if (($in{'language'} eq "Japanese") {

$field_name="Japanese";

etc...

}

else {

$field_name="English";

etc.....

}

It then displayed the results to the user in their language.

Can DBMan SQL 2.0.3 do a similar thing using templates? If so, how?



I guess I will have more questions as I progress but would appreciate it if someone could help me with the above.

Thank you.

Simon.
Quote Reply
Re: [jai] DBMan SQL 2.0.3 Beginner In reply to
Quote:
5/ Is it possible to translate the table contents into different languages?
Did you ever get solution to this?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] DBMan SQL 2.0.3 Beginner In reply to
I did it using seperate language files, which works ok if you know what the contents of the tables will be.
As I said in my original post (way back in 2002), I used -

if (($in{'language'} eq "Japanese") {

$field_name="Japanese";

etc...

}

else {

$field_name="English";

etc.....

}

Simon.

Quote Reply
Re: [jai] DBMan SQL 2.0.3 Beginner In reply to
Where did you place that code?
Into a global?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] DBMan SQL 2.0.3 Beginner In reply to
For the text on my html pages, I used a seperate language file and called it in my header.html using -
<%include /path/cgi-local/database/admin/templates/shared/language.txt%>
so it was processed when each html page was loaded.
Rather than using seperate templates for each language, I used the above language file to process ALL text on every page. (e.g only one add_form.html but unlimited languages).

In the case of more complex translations like translating table data I used a custom module and called them using <%Dbsql::modulename::subname%> from within each html template where needed.
All of the translations from the language file can be used in the custom module by using -
my $tags = GT::Template->tags;

I guess you could also do it with template globals but I found that I needed to many and it took to long to input. Everything in one custom module seemed to be easier.

Hope that helps.
Simon.
Quote Reply
Re: [jai] DBMan SQL 2.0.3 Beginner In reply to
Hi,

In Reply To:
1/ In the Sample database that is installed during setup I can't find where the error message "Column price cannot be left blank." comes from. I assumed that all the user messages can be changed in the User Language template but I can't find that particular message. Where can I find it if I want to change it and are there other user messages not in the User Language template?[/quote]The error message can be found within templates/default/language.txt

In Reply To:
2/ If I set up multiple language templates, how do users call up the different templates. I have read through a lot of GT posts (mainly Links SQL) and I think I understand how to set up multiple template sets but I don't know how to call them up. Does DBMan SQL 2.0.3 use page.cgi?[/quote]Just simply use the urll below:
db.cgi?db=table;do=home;t=template_name

In Reply To:
3/ When installing DBMan SQL 2.0.3 a lot of directories and files are installed. Which ones can I remove?? e.g homes, image_gallery, etc. DBMan SQL 1.0.1 only uses 3 or 4 files but it appears that DBMan SQL 2.0.3 relies on many many more. What files are actually required?[/quote]homes, bookstore and image_gallery are sample template sets that you can learn how to work with template from them. You can remove them if you want.

In Reply To:
4/ How do you add categories to the Language template sets?[/quote]I'm not sure what you're trying to do, can you give me more details about it?

In Reply To:
5/ Is it possible to translate the table contents into different languages? The table contents will always be in English but I want to translate the results that users see into different languages. E.g if the table field is "RED" I want the user to see "XXX" (RED in Japanese or another language). How would I set something like that up? I did it with DBMan SQL 1.0.1 using seperate language files that translated the table fields depending on the users language.[/quote]In this case, you should have seperate columns for each language. i.e: content_en, content_fr, content_jp....

And then html code for displaying like:

<%if lang eq 'en'%>
<%content_en%>
<%elsif lang eq 'jp'%>
<%content_jp%>
<%elsif.....%>
....
<%endif%>

Hope that helps.

TheStone.


B.