added some but not all (no plurals) source code matching
small fixes + bugfixes
locale aware number_format function + smarty implementation
safe setting of loopsid/loopspath (won't set properties of objects with __set function unless static property  exists)