This modules allows access to the gettext system implementation provided by VLC.
Availability
Script Types |
---|
Interface, Services Discovery |
_()
Localization function for the module.
The name refers to the C function “gettext()”, which is usually aliased to “_()” in order to save space.
Usage
-- VLC language is set to: "Français"
local search = vlc.gettext._("Search")
print(search) -- Outputs "Rechercher"
Parameters
str
A string to be localized to the current user’s language
Return value
A localized string in the user’s language
N_()
Returns a string passed to it.
The name (seemingly) refers to the plural form of gettext, but N_()
is not called internally.
-- VLC language is set to: "Français"
local search = vlc.gettext.N_("Search")
print(search) -- Outputs "Search"
Parameters
- Optional
str
A string to be returned
Return value
If str
is passed, then it is returned, otherwise nil
.