NAME

Translate::Fluent::ResourceSet - a set of translation resources

SYNOPSIS

my $resource_set = Translate::Fluent->parse_file( "filename.flt" );
my $variables = {};

print $resource_set->translate('some-string', $variables );

DESCRIPTION

Translate::Fluent::ResourceSet groups multiple translation resources, often from a single file, and allow you to get translations from them, even when they need other resources in the resource set.

METHODS

add_resource( $resource )

add_resource can be used to add one resource to an existing ResourceSet.

while this can be used externally, it is intended for internal use.

translate( $res_id, $variables )

Translate a message.

my $text = $resource_set->translate( 'some-message-id', $variables );

get_term( $term_id )

Returns a Term object with the id $term_id. This can be useful, but is intended for internal use.

get_message( $message_id )

Returns a Message object with the id $message_id. This can be useful, but is intended for internal use.

SEE MORE

This file is part of Translate::Fluent - version, license and more general information can be found in its documentation.