Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 235 matches
Smarty Forum Index
Author Message
  Topic: best way to build a multi-language site with smarty
AZTEK

Replies: 210
Views: 1194812

PostForum: 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: 1194812

PostForum: 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: 8869

PostForum: 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: 6196

PostForum: 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: 1194812

PostForum: 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: 7425

PostForum: 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: 1194812

PostForum: 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: 1194812

PostForum: 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: 7216

PostForum: 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: 1194812

PostForum: 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: 1194812

PostForum: 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! Wink
I am glad some people find it usefull.
  Topic: the difference between assign and assign_by_ref?
AZTEK

Replies: 2
Views: 7695

PostForum: 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: 14905

PostForum: 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: 17352

PostForum: 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: 5217

PostForum: 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.
 
Page 1 of 16 Goto page 1, 2, 3 ... 14, 15, 16  Next
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP