tizen 2.3.1 release
[framework/api/application.git] / include / app_i18n.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef __TIZEN_APPFW_I18N_H__
19 #define __TIZEN_APPFW_I18N_H__
20
21 #include <tizen.h>
22
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27
28 /**
29  * @file app_i18n.h
30  */
31
32  /**
33  * @addtogroup CAPI_I18N_MODULE
34  * @{
35  */
36
37 /**
38  * @brief Definition to mark a string for translation, which is replaced with the translated string at runtime.
39  * @param[in] msg The string to be translated
40  */
41 #ifndef _
42 #define _(msg) i18n_get_text(msg)
43 #endif
44
45 /**
46  * @brief Gets the localized translation for the specified string.
47  *
48  * @details If a translation is not found in the localization file(.po file), @a message is returned.
49  *
50  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
51  * @remarks Do not free the returned value.
52  *
53  * @param[in] message The string to be translated
54  * @return  The localized translation for the given @a message on success,
55  *          otherwise the given @a message
56  */
57 char* i18n_get_text(const char *message);
58
59 /**
60  * @}
61  */
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* __TIZEN_APPFW_I18N_H__ */