Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Delphi Translating Strings -


i'm using delphi 2007 , wonder how following problem can solved:

i have translate acomp.caption example, string want assign caption, depends on data (for example date or number, gets formatted). therefore have save data , string in new variable every translation, annoying.

what want that:

// add string , data internal list of translator // , return dynamicstring, represents translated value acomp.caption := t.newtranslatedstring("hello %s, cheese?", user) 

(note acomp.caption ("hello %s..") can changed in different methods)

when switching language, call t.translateagain() , value of strings translated and, if data given, formatted again.

is possible or know way solving given problem?

thanks in advance

additional question: strings normal objects, can subclass , add dynamic behaviour changes string in special cases?

delphi strings not objects, can't add behaviours them. need develop own class.

the windows way localize applications advantage of resources, can changed (and loading redirected) without changes code (no need call special functions or add new components), , without run-time calls load resource. disadvantage of resources cannot changed end user. delphi 2007 standard localization tools use approach.

anyway there libraries dxgettext (which port of gnu gettext library) or tsilang, example use more "intrusive" approach, requiring changes code or adding components. in exchange can simplify end-user localization.

before developing own localization library, check if 1 of existing ones fits youe needs.

note: aware delphi localization tool has significant issues weren't fixed until xe (which didn't test yet). see example qc #79449. unluckily fix never backported earlier releases.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -