Lang.F Thought

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
dwkrueger
Posts: 47
Joined: Tue Jun 26, 2007 1:43 pm
Location: Indiana

Lang.F Thought

Post by dwkrueger » Wed May 21, 2008 7:21 pm

I keep thinking about your issue with providing the language translation and putting all of the Static strings through the method Lan.F. I keep thinking what about overriding the object.ToString() method. But this would be nice becuase the ToString() method is so handy and intellisense brings it up often. But I think you would get into all sorts of problems ie referencing column names and the column name get interpeted. Then I thought what if we add a method to the object class or the string class that provides the translation lookup.

So now instead of having to type Lan.F (string) or Lan.g(string) you can just type "hello world".F or "hello World".g . Okay so it is only 5 keystrokes better but it just seems that there might be a better way.

I have never overridden such a low level object before it might be intersting. I'm not sure we can even do this without creating a new object that inherits from the other object -string (yuck).

Just a thought.

Dan

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Lang.F Thought

Post by jordansparks » Wed May 21, 2008 10:43 pm

I'm pretty sure it's easier in .Net 3.5 because we can use an extension method to extend String with g. But we would have to make sure Mono supports such a new feature. And there is a disadvantage in that g is not as intuitive as Lan.g. Lan.g is a quickly recognizable English word part. I say we leave it alone.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
dwkrueger
Posts: 47
Joined: Tue Jun 26, 2007 1:43 pm
Location: Indiana

Re: Lang.F Thought

Post by dwkrueger » Thu May 22, 2008 3:33 am

I also think you Lan.g is too embedded to really fiddle with now but it was just a rogue thought.

Post Reply