ObjFW
Loading...
Searching...
No Matches
OFLocale.h File Reference
import "OFObject.h"
import "OFString.h"

Go to the source code of this file.

Classes

class  OFLocale
 A class for querying the locale and retrieving localized strings. More...
 

Macros

#define OF_LOCALIZED(ID, ...)
 Returns the localized string for the specified ID with the specified arguments inserted.
 

Macro Definition Documentation

◆ OF_LOCALIZED

#define OF_LOCALIZED ( ID,
... )
Value:
[[OFLocale currentLocale] localizedStringForID: ID \
fallback: __VA_ARGS__, nil]
#define nil
A value representing no object.
Definition ObjFWRT.h:68
A class for querying the locale and retrieving localized strings.
Definition OFLocale.h:54

Returns the localized string for the specified ID with the specified arguments inserted.

Parameters
IDThe ID of the localized string to retrieve
Returns
The localized string with the specified arguments replaced
Exceptions
OFInvalidFormatExceptionThe string (either the fallback or the localized one) contains an invalid format