Concat( Localised< string > a, Localised< string > b ) { a = a ?? Localised.Create( "" ); b = b ?? Localised.Create( "" ); return Localised.Create( (uic,c) => Maybe.Create( string.Concat( a.In( uic, c ), b.In( uic, c ) ) ) ); }
Format( Localised< string > format, params object[] args ) { if( format == null ) throw new ArgumentNullException( "format" ); if( args == null ) throw new ArgumentNullException( "args" ); return Localised.Create( (uic,c) => Maybe.Create( string.Format( c, format.In( uic, c ), args.Select( arg => arg is ILocalised ? ((ILocalised)arg) .AsLocalisedObject() .In( uic, c ) : arg ) .ToArray() ) ) ); }