Number/Currenct formatting by locale

Peter Haworth pete at mollysrevenge.com
Tue Mar 1 13:11:01 EST 2011


Yes, the situation is certainly different for web apps (mine's a desktop app).  The coding is quite simple to get the OS preferences and store them.  The hard part is the formatting code which has to be done no matter where I get the prefs from.  LC makes it easy to deal with dates and times but, as far as I can tell, has no way to format numbers and currency values per user or OS preferences, so that's what  is really behind this.  If 'm wrong on that, someone please tell me!

Pete Haworth

On Mar 1, 2011, at 9:50 AM, Keith Clarke wrote:

> Peter (sorry, Bob!),
> I guess I spend too much time using web apps on multiple platforms - I forget that with desktop client-server, you tend to move the client with you! Still, with net-aware client-server, you might still want the local to be a virtual user setting across (for instance) work PC, home Mac, iPad etc. I do get what you mean about the first run, but if that convenience means loads of coding for platform-specific interrogation, I think I'd use the indolence plugin - that is, give the user a preferences dialogue box!
> 
> Oh - and the reason I'd be checking Salesforce from holiday is to check whether I can stay for another month or have to come back and do some work - in my dreams that is!    
> Best,
> Keith..
> 
> On 1 Mar 2011, at 17:11, Peter Haworth wrote:
> 
>> Hi Keith,
>> Actually, it's me who is trying to implement this not Bob.  You raise some good points though.  My first question is why on earth would you be running Salesforce when you're on holiday in the Maldives :-)
>> 
>> My thoughts are that are that the first time you run my application, it will gather the OS preferences and store them as it's private preferences which the user can change if needed.  So in your example, assuming you first run the app on a computer that has it's preferences set to wherever you live, my app would store those preferences locally.  Then when you're in the Maldives, it will still use it's private preferences rather than the ones on the computer you are on, unless, of course, you needed to change them because you decided to move to the Maldives permanently :-)
>> 
>> In my related post, I'm looking for a script to format currency according to the info in the OS preferences since I'd probably store that data within my app in that form.
>> 
>> Pete Haworth
>> 
>> On Mar 1, 2011, at 12:59 AM, Keith Clarke wrote:
>> 
>>> Bob, 
>>> Just a couple of thoughts - I don't know what you're trying to achieve with your app, but are you sure you even want to have such settings to follow the user's machine/OS settings automatically? 
>>> 
>>> From my experience with multi-locale/currency/language software products - ERP, CRM, etc - localisation settings tend to be associated with entities (including, of course, the user entity!) rather than bubble-up from the  environment in which the app is being accessed. For example, if I log into Salesforce.com from an internet cafe, whilst on holiday in the Maldives (some hope!), I still want my reports to follow my personal user-based preference for locale, rather than the machine I happen to be using or its IP address.     
>>> 
>>> Also, multi-currency apps tend to have a limited number of supported currencies so that exchange rates can be managed.
>>> 
>>> Ignore all this if it's outside the scope of your current considerations.
>>> Best,
>>> Keith..  
>>> 
>>> On 1 Mar 2011, at 01:35, Bob Sneidar wrote:
>>> 
>>>> Oh nvm I just read the whole thing didn't try LC
>>>> 
>>>> Bob
>>>> 
>>>> On Feb 28, 2011, at 5:12 PM, Peter Haworth wrote:
>>>> 
>>>>> The decimal point is there but the thousands sep and grouping info is wrong.  Similar corruption occurs for the LC_MONETARY info.
>>>>> 
>>>>> Is Shell broken?
>>>>> 
>>>>> 
>>>>> Pete Haworth
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list