[SalesForce] Format decimal number with thousand separator with a dot (.)

I would like to format a visualforce variable '{!TotalE}' with a thousand separator as . notation for example

123386258.00 becomes 123.386.258

I have tried examples of
outputtext 'value="{0, number, #,###,###,##0}"' this returns 123,386,258 what i would like to achieve is 123.386.258 like a swedish format

Best Answer

Try using apex:outputField, it would do the formatting for you based on your locale.

Unfortunately its not possible with apex:outputText and apex:param. Here is a similar idea.

There was a comment in the idea which could be helpful but would need bit of modification as per requirement:

Option 1: Standard

<apex:outputText value="{0, number, ###,##0.00}">
    <apex:param value="{!Opportunity.Amount}"/>
</apex:outputText> </span> 

result : 100,000.00


Option 2: Custom formulas

<span>
    {!IF(Opportunity.Amount < 0, 
        "-", 
        "") & 
        IF(ABS(Opportunity.Amount) >= 1000000, 
            TEXT(FLOOR(ABS(Opportunity.Amount) / 1000000)) & ".", 
            "") & 
        IF(ABS(Opportunity.Amount) >= 1000, 
            RIGHT(TEXT(FLOOR(ABS(Opportunity.Amount) / 1000)), 3) & ".", 
            "") & 
        RIGHT(TEXT(FLOOR(ABS(Opportunity.Amount))), 3) & "," & 
        IF(MOD(ABS(Opportunity.Amount) , 1) * 100 < 10, 
            "0" & TEXT(ROUND(MOD(ABS(Opportunity.Amount), 1), 2) * 100), 
            TEXT(MIN(ROUND(MOD(ABS(Opportunity.Amount) , 1), 2) * 100, 99))
        )}
</span> 

Result: 100.000,00