Add BMessageFormat class.
This can be used to format complex messages properly. It moves the complexity of handling plural forms, gender, and anything else needed into the localizable string, rather than hardcoding it in the code. This moves the difficulty of handling these things properly to people doing translations, rather than relying on developers to do it. Fixes #10755, but our localization must now be updated to make use of the feature.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2014, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _B_MESSAGE_FORMAT_H_
|
||||
#define _B_MESSAGE_FORMAT_H_
|
||||
|
||||
|
||||
#include <Format.h>
|
||||
|
||||
|
||||
class BMessageFormat: public BFormat {
|
||||
public:
|
||||
status_t Format(BString& buffer, const BString message,
|
||||
const int32 arg);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user