Author |
Message |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Mon Sep 20, 2004 11:05 am Subject: best way to build a multi-language site with smarty |
You need to use the current language in the cacheid. So $smarty->display('blah.tpl') would become $smarty->display('blah.tpl', $lang) |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Sat Sep 18, 2004 2:05 pm Subject: best way to build a multi-language site with smarty |
You could probably do something like{capture assign=string}{t}Default error string{/t}{/capture}
{$smarty.request.error|default:$string} |
Topic: MySQL in smarty |
AZTEK
Replies: 1
Views: 8924
|
Forum: Smarty Development Posted: Wed Aug 04, 2004 2:26 am Subject: MySQL in smarty |
mysql_connect is a function from PHP the manual page is at http://www.php.net/mysql_connect the reason it is undefined is you either did not build PHP using --with-mysql or you need to include the mys ... |
Topic: Google AdSense |
AZTEK
Replies: 1
Views: 6226
|
Forum: General Posted: Tue Aug 03, 2004 1:11 pm Subject: Google AdSense |
Google AdSense works using the google web crawlers information about a page. So as long as each page has its own individual content AdSense will pick up on it and have relevent ads for each. |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Wed Jul 21, 2004 4:29 pm Subject: best way to build a multi-language site with smarty |
This all just goes to show that much like anything else in programming it can be done multiple ways. Each with its own strengths and none better then another. |
Topic: Problems with PHP5 and $_POST|GET |
AZTEK
Replies: 2
Views: 7461
|
Forum: General Posted: Sun Mar 21, 2004 5:14 pm Subject: Problems with PHP5 and $_POST|GET |
if you dont pass blabla via post and yet try to access it PHP will throw a notice telling you it doesn't exist this is easily solved by using isset() to test if the variable has been passed before try ... |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Wed Mar 17, 2004 2:23 pm Subject: best way to build a multi-language site with smarty |
Yea the approch by which you use the locale string as a cache id is much more useful then to just skip caching translated words entirely. Its what I would do. |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Wed Mar 17, 2004 11:37 am Subject: best way to build a multi-language site with smarty |
sorry, why would you turn on caching and then don't cache the translated texts?
Your right a much better way would be to use the locale string as part of a cache id. |
Topic: Multilang with different template set ? |
AZTEK
Replies: 3
Views: 7258
|
Forum: General Posted: Wed Mar 17, 2004 11:15 am Subject: Multilang with different template set ? |
Both the XML method and the gettext method can translate HTML. I am not sure about the length on the gettext method but I bet it can handle a large paragraph. The XML method I provided should have no ... |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Wed Mar 17, 2004 11:06 am Subject: best way to build a multi-language site with smarty |
You will need to change your call to $smarty->register_block so that the third parameter is false meaning the output of the block is not cacheable. I just added that to my original post. |
Topic: best way to build a multi-language site with smarty |
AZTEK
Replies: 210
Views: 1207525
|
Forum: Tips and Tricks Posted: Fri Mar 12, 2004 1:48 pm Subject: best way to build a multi-language site with smarty |
AZTEK, I found you method better then others! Respect! And thanx for it!
I am glad some people find it usefull. |
Topic: the difference between assign and assign_by_ref? |
AZTEK
Replies: 2
Views: 7743
|
Forum: General Posted: Wed Feb 18, 2004 10:50 am Subject: the difference between assign and assign_by_ref? |
Never really used assign_by_ref but judging by the name I assume it assigns a $blah = 1;
$smarty->assign_by_ref('blah', $blah);
$blah = 2;
$smarty->display('template.tpl');and ... |
Topic: concatenate strings in {eval} |
AZTEK
Replies: 7
Views: 14990
|
Forum: General Posted: Fri Feb 06, 2004 9:53 am Subject: concatenate strings in {eval} |
Use {assign} in the template to put the strings in another variable. |
Topic: [solved] $smarty.get.page empty (Bug?) |
AZTEK
Replies: 5
Views: 17418
|
Forum: General Posted: Tue Feb 03, 2004 11:47 pm Subject: [solved] $smarty.get.page empty (Bug?) |
Using $smarty.server.SERVER_NAME along with $smarty.server.REQUEST_URI should yeild the entire url minus the http part. |
Topic: Nesting |
AZTEK
Replies: 1
Views: 5244
|
Forum: General Posted: Tue Feb 03, 2004 12:59 am Subject: Nesting |
This{assign var="counter" value=$pictures[photo].id}
{$photo_block_error_styles.selected[$counter]}should work. |
|