NAME
Kernel::System::FAQ::Language – sub module of Kernel::System::FAQ
DESCRIPTION
All FAQ language functions.
PUBLIC INTERFACE
LanguageAdd()
add a language
my $Success = $FAQObject->LanguageAdd(
Name => 'Some Language',
UserID => 1,
);
Returns:
$Success = 1; # or undef if language could not be added
LanguageDelete()
Delete a language.
my $DeleteSuccess = $FAQObject->LanguageDelete(
LanguageID => 123,
UserID => 1,
);
Returns
$DeleteSuccess = 1; # or undef if language could not be deleted
LanguageDuplicateCheck()
check a language
my $Exists = $FAQObject->LanguageDuplicateCheck(
Name => 'Some Name',
LanguageID => 1, # for update
UserID => 1,
);
Returns:
$Exists = 1; # if language already exists, or 0 if does not exist
LanguageGet()
get a language details as a hash
my %Language = $FAQObject->LanguageGet(
LanguageID => 1,
UserID => 1,
);
Returns:
%Language = (
LanguageID => '1',
Name => 'en',
);
LanguageList()
get the language list as a hash
my %Languages = $FAQObject->LanguageList(
UserID => 1,
);
Returns:
%Languages = (
1 => 'en',
2 => 'de',
3 => 'es',
);
LanguageLookup()
This method does a lookup for a FAQ language. If a language id is given, it returns the name of the language. If the name of the language is given, the language id is returned.
my $LanguageName = $FAQObject->LanguageLookup(
LanguageID => 1,
);
my $LanguageID = $FAQObject->LanguageLookup(
Name => 'en',
);
Returns:
$LanguageName = 'en';
$LanguageID = 1;
LanguageUpdate()
update a language
my $Success = $FAQObject->LanguageUpdate(
LanguageID => 1,
Name => 'de',
UserID => 1,
);
Returns:
$Success = 1; # or undef if language could not be updated