MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Macros | Functions | Variables
Internationlization of system text

Macros

#define IDS_MGST_WINDOW   0
 The identifier of the window system text. More...
 
#define IDS_MGST_START   1
 The identifier of the start system text. More...
 
#define IDS_MGST_REFRESH   2
 The identifier of the refresh background system text. More...
 
#define IDS_MGST_CLOSEALLWIN   3
 The identifier of the close all windows system text. More...
 
#define IDS_MGST_ENDSESSION   4
 The identifier of the end session system text. More...
 
#define IDS_MGST_OPERATIONS   5
 The identifier of the operations system text. More...
 
#define IDS_MGST_MINIMIZE   6
 The identifier of the minimize system text. More...
 
#define IDS_MGST_MAXIMIZE   7
 The identifier of the maximize system text. More...
 
#define IDS_MGST_RESTORE   8
 The identifier of the restore system text. More...
 
#define IDS_MGST_CLOSE   9
 The identifier of the close system text. More...
 
#define IDS_MGST_OK   10
 The identifier of the ok system text. More...
 
#define IDS_MGST_NEXT   11
 The identifier of the next system text. More...
 
#define IDS_MGST_CANCEL   12
 The identifier of the cancel system text. More...
 
#define IDS_MGST_PREV   13
 The identifier of the previous system text. More...
 
#define IDS_MGST_YES   14
 The identifier of the yes system text. More...
 
#define IDS_MGST_NO   15
 The identifier of the no system text. More...
 
#define IDS_MGST_ABORT   16
 The identifier of the abort system text. More...
 
#define IDS_MGST_RETRY   17
 The identifier of the retry system text. More...
 
#define IDS_MGST_IGNORE   18
 The identifier of the ignore system text. More...
 
#define IDS_MGST_ABOUTMG   19
 The identifier of the about minigui system text. More...
 
#define IDS_MGST_OPENFILE   20
 The identifier of the open file system text. More...
 
#define IDS_MGST_SAVEFILE   21
 The identifier of the save file system text. More...
 
#define IDS_MGST_COLORSEL   22
 The identifier of the color selection system text. More...
 
#define IDS_MGST_SWITCHLAYER   23
 The identifier of the switch layer system text. More...
 
#define IDS_MGST_DELLAYER   24
 The identifier of the delete layer system text. More...
 
#define IDS_MGST_ERROR   25
 The identifier of the error system text. More...
 
#define IDS_MGST_LOGO   26
 The identifier of the logo system text. More...
 
#define IDS_MGST_CURRPATH   27
 The identifier of the current path system text. More...
 
#define IDS_MGST_FILE   28
 The identifier of the file system text. More...
 
#define IDS_MGST_LOCATION   29
 The identifier of the location system text. More...
 
#define IDS_MGST_UP   30
 The identifier of the up system text. More...
 
#define IDS_MGST_NAME   31
 The identifier of the name system text. More...
 
#define IDS_MGST_SIZE   32
 The identifier of the size system text. More...
 
#define IDS_MGST_ACCESSMODE   33
 The identifier of the access mode system text. More...
 
#define IDS_MGST_LASTMODTIME   34
 The identifier of the last modify time system text. More...
 
#define IDS_MGST_OPEN   35
 The identifier of the open system text. More...
 
#define IDS_MGST_FILENAME   36
 The identifier of the file name system text. More...
 
#define IDS_MGST_FILETYPE   37
 The identifier of the file type system text. More...
 
#define IDS_MGST_SHOWHIDEFILE   38
 The identifier of the show hide file system text. More...
 
#define IDS_MGST_NOTFOUND   39
 The identifier of the not found file system text. More...
 
#define IDS_MGST_NR   40
 The identifier of the can't read system text. More...
 
#define IDS_MGST_NW   41
 The identifier of the can't write system text. More...
 
#define IDS_MGST_INFO   42
 The identifier of the information system text. More...
 
#define IDS_MGST_R   43
 The identifier of the read system text. More...
 
#define IDS_MGST_W   44
 The identifier of the write system text. More...
 
#define IDS_MGST_WR   45
 The identifier of the read and write system text. More...
 
#define IDS_MGST_SAVE   46
 The identifier of the save system text. More...
 
#define IDS_MGST_FILEEXIST   47
 The identifier of the file exist system text. More...
 

Functions

const MG_EXPORT char *GUIAPI GetSysText (unsigned int id)
 Translates system text to localized text. More...
 
const MG_EXPORT char **GUIAPI GetSysTextInUTF8 (const char *language)
 Get the localized system text array in UTF-8 for a specified language. More...
 

Variables

const MG_EXPORT char * SysText []
 Contains all text used by MiniGUI in English. More...
 
const MG_EXPORT char ** local_SysText
 The pointer to the current localized system text array. More...
 

Detailed Description

Macro Definition Documentation

◆ IDS_MGST_ABORT

#define IDS_MGST_ABORT   16

The identifier of the abort system text.

Definition at line 4331 of file minigui.h.

◆ IDS_MGST_ABOUTMG

#define IDS_MGST_ABOUTMG   19

The identifier of the about minigui system text.

Definition at line 4349 of file minigui.h.

◆ IDS_MGST_ACCESSMODE

#define IDS_MGST_ACCESSMODE   33

The identifier of the access mode system text.

Definition at line 4433 of file minigui.h.

◆ IDS_MGST_CANCEL

#define IDS_MGST_CANCEL   12

The identifier of the cancel system text.

Definition at line 4307 of file minigui.h.

◆ IDS_MGST_CLOSE

#define IDS_MGST_CLOSE   9

The identifier of the close system text.

Definition at line 4289 of file minigui.h.

◆ IDS_MGST_CLOSEALLWIN

#define IDS_MGST_CLOSEALLWIN   3

The identifier of the close all windows system text.

Definition at line 4253 of file minigui.h.

◆ IDS_MGST_COLORSEL

#define IDS_MGST_COLORSEL   22

The identifier of the color selection system text.

Definition at line 4367 of file minigui.h.

◆ IDS_MGST_CURRPATH

#define IDS_MGST_CURRPATH   27

The identifier of the current path system text.

Definition at line 4397 of file minigui.h.

◆ IDS_MGST_DELLAYER

#define IDS_MGST_DELLAYER   24

The identifier of the delete layer system text.

Definition at line 4379 of file minigui.h.

◆ IDS_MGST_ENDSESSION

#define IDS_MGST_ENDSESSION   4

The identifier of the end session system text.

Definition at line 4259 of file minigui.h.

◆ IDS_MGST_ERROR

#define IDS_MGST_ERROR   25

The identifier of the error system text.

Definition at line 4385 of file minigui.h.

◆ IDS_MGST_FILE

#define IDS_MGST_FILE   28

The identifier of the file system text.

Definition at line 4403 of file minigui.h.

◆ IDS_MGST_FILEEXIST

#define IDS_MGST_FILEEXIST   47

The identifier of the file exist system text.

Definition at line 4517 of file minigui.h.

◆ IDS_MGST_FILENAME

#define IDS_MGST_FILENAME   36

The identifier of the file name system text.

Definition at line 4451 of file minigui.h.

◆ IDS_MGST_FILETYPE

#define IDS_MGST_FILETYPE   37

The identifier of the file type system text.

Definition at line 4457 of file minigui.h.

◆ IDS_MGST_IGNORE

#define IDS_MGST_IGNORE   18

The identifier of the ignore system text.

Definition at line 4343 of file minigui.h.

◆ IDS_MGST_INFO

#define IDS_MGST_INFO   42

The identifier of the information system text.

Definition at line 4487 of file minigui.h.

◆ IDS_MGST_LASTMODTIME

#define IDS_MGST_LASTMODTIME   34

The identifier of the last modify time system text.

Definition at line 4439 of file minigui.h.

◆ IDS_MGST_LOCATION

#define IDS_MGST_LOCATION   29

The identifier of the location system text.

Definition at line 4409 of file minigui.h.

◆ IDS_MGST_LOGO

#define IDS_MGST_LOGO   26

The identifier of the logo system text.

Definition at line 4391 of file minigui.h.

◆ IDS_MGST_MAXIMIZE

#define IDS_MGST_MAXIMIZE   7

The identifier of the maximize system text.

Definition at line 4277 of file minigui.h.

◆ IDS_MGST_MINIMIZE

#define IDS_MGST_MINIMIZE   6

The identifier of the minimize system text.

Definition at line 4271 of file minigui.h.

◆ IDS_MGST_NAME

#define IDS_MGST_NAME   31

The identifier of the name system text.

Definition at line 4421 of file minigui.h.

◆ IDS_MGST_NEXT

#define IDS_MGST_NEXT   11

The identifier of the next system text.

Definition at line 4301 of file minigui.h.

◆ IDS_MGST_NO

#define IDS_MGST_NO   15

The identifier of the no system text.

Definition at line 4325 of file minigui.h.

◆ IDS_MGST_NOTFOUND

#define IDS_MGST_NOTFOUND   39

The identifier of the not found file system text.

Definition at line 4469 of file minigui.h.

◆ IDS_MGST_NR

#define IDS_MGST_NR   40

The identifier of the can't read system text.

Definition at line 4475 of file minigui.h.

◆ IDS_MGST_NW

#define IDS_MGST_NW   41

The identifier of the can't write system text.

Definition at line 4481 of file minigui.h.

◆ IDS_MGST_OK

#define IDS_MGST_OK   10

The identifier of the ok system text.

Definition at line 4295 of file minigui.h.

◆ IDS_MGST_OPEN

#define IDS_MGST_OPEN   35

The identifier of the open system text.

Definition at line 4445 of file minigui.h.

◆ IDS_MGST_OPENFILE

#define IDS_MGST_OPENFILE   20

The identifier of the open file system text.

Definition at line 4355 of file minigui.h.

◆ IDS_MGST_OPERATIONS

#define IDS_MGST_OPERATIONS   5

The identifier of the operations system text.

Definition at line 4265 of file minigui.h.

◆ IDS_MGST_PREV

#define IDS_MGST_PREV   13

The identifier of the previous system text.

Definition at line 4313 of file minigui.h.

◆ IDS_MGST_R

#define IDS_MGST_R   43

The identifier of the read system text.

Definition at line 4493 of file minigui.h.

◆ IDS_MGST_REFRESH

#define IDS_MGST_REFRESH   2

The identifier of the refresh background system text.

Definition at line 4247 of file minigui.h.

◆ IDS_MGST_RESTORE

#define IDS_MGST_RESTORE   8

The identifier of the restore system text.

Definition at line 4283 of file minigui.h.

◆ IDS_MGST_RETRY

#define IDS_MGST_RETRY   17

The identifier of the retry system text.

Definition at line 4337 of file minigui.h.

◆ IDS_MGST_SAVE

#define IDS_MGST_SAVE   46

The identifier of the save system text.

Definition at line 4511 of file minigui.h.

◆ IDS_MGST_SAVEFILE

#define IDS_MGST_SAVEFILE   21

The identifier of the save file system text.

Definition at line 4361 of file minigui.h.

◆ IDS_MGST_SHOWHIDEFILE

#define IDS_MGST_SHOWHIDEFILE   38

The identifier of the show hide file system text.

Definition at line 4463 of file minigui.h.

◆ IDS_MGST_SIZE

#define IDS_MGST_SIZE   32

The identifier of the size system text.

Definition at line 4427 of file minigui.h.

◆ IDS_MGST_START

#define IDS_MGST_START   1

The identifier of the start system text.

Definition at line 4241 of file minigui.h.

◆ IDS_MGST_SWITCHLAYER

#define IDS_MGST_SWITCHLAYER   23

The identifier of the switch layer system text.

Definition at line 4373 of file minigui.h.

◆ IDS_MGST_UP

#define IDS_MGST_UP   30

The identifier of the up system text.

Definition at line 4415 of file minigui.h.

◆ IDS_MGST_W

#define IDS_MGST_W   44

The identifier of the write system text.

Definition at line 4499 of file minigui.h.

◆ IDS_MGST_WINDOW

#define IDS_MGST_WINDOW   0

The identifier of the window system text.

Definition at line 4235 of file minigui.h.

◆ IDS_MGST_WR

#define IDS_MGST_WR   45

The identifier of the read and write system text.

Definition at line 4505 of file minigui.h.

◆ IDS_MGST_YES

#define IDS_MGST_YES   14

The identifier of the yes system text.

Definition at line 4319 of file minigui.h.

Function Documentation

◆ GetSysText()

const char *GUIAPI GetSysText ( unsigned int  id)

Translates system text to localized text.

When MiniGUI display some system messages, it will call GetSysText function to translate system text from English to other language. Global variable SysText contains all text used by MiniGUI in English.

GetSysText function returns localized text from local_SysText. MiniGUI have already defined localized sytem text for en_US, zh_CN.GB2312 and zh_TW.Big5 locales. MiniGUI initializes local_SysText to point one of above localized system text when startup. You can also let local_SysText point to your customized string array.

Parameters
idThe system text id.
Returns
The localized text.
See also
SysText, local_SysText

◆ GetSysTextInUTF8()

const char **GUIAPI GetSysTextInUTF8 ( const char *  language)

Get the localized system text array in UTF-8 for a specified language.

This function returns the localized system text array in UTF-8 encode for the specified language. You can use the returned localized system text array to set local_SysText if your system logical fonts are using UNICODE/UTF-8 charset.

Parameters
languageThe language name. So far, you can specify the language as 'zh_CN' (for simlified Chinese) or 'zh_TW' (for tranditional Chinese).
Returns
The pointer to the localized system text array.
See also
SysText, local_SysText

Variable Documentation

◆ local_SysText

const char ** local_SysText

The pointer to the current localized system text array.

Changing local_SysText will lead to GetSysText returns a different localized system text. Please set it when MiniGUI starts and send desktop a MSG_REINITSESSION message (call ReinitDesktop function) after assigned a different value to this variable.

See also
GetSysText, SysText, ReinitDesktopEx

◆ SysText

const char * SysText[]

Contains all text used by MiniGUI in English.

System text defined as follows in MiniGUI:

const char* SysText [] =
{
"Windows...",
"Start...",
"Refresh Background",
"Close All Windows",
"End Session",
"Operations...",
"Minimize",
"Maximize",
"Restore",
"Close",
"OK",
"Next",
"Cancel",
"Previous",
"Yes",
"No",
"Abort",
"Retry",
"Ignore",
"About MiniGUI...",
"Open File",
"Save File",
"Color Selection",
"Switch Layer",
"Delete Layer",
"Error",
"LOGO",
"Current Path",
"File",
#if (!defined (__NOUNIX__) || defined (WIN32)) && defined (_MGCTRL_LISTVIEW)
"Location",
"Up",
"Name",
"Size",
"Access Mode",
"Last Modify Time",
"Open",
"File Name",
"File Type",
"Show Hide File",
"Sorry! not find %s ",
"Can't Read %s !",
"Can't Write %s !",
"Information",
"R",
"W",
"WR",
"Save",
"File %s exists, Replace or not?",
#endif
};
See also
GetSysText, local_SysText
NULL
#define NULL
A value indicates null pointer.
Definition: common.h:369
SysText
const MG_EXPORT char * SysText[]
Contains all text used by MiniGUI in English.