TBX::Min::LangSet - Store information from one TBX-Min langSet element
langSet
version 0.08
use TBX::Min::LangSet; use TBX::Min::TIG; my $lang_grp = TBX::Min::LangSet->new( {code => 'en'}); print $lang_grp->lang(); # 'en' my $term_grp = TBX::Min::TIG->new({term => 'perl'}); $lang_grp->add_term_group($term_grp); my $term_grps = $lang_grp->term_groups; print $#$term_grps; # '1'
This class represents a single language group contained in a TBX-Min file. A language group is contained by a concept termEntry, and contains several term groups each representing a given concept for the same language.
new
Creates a new TBX::Min::LangSet instance. Optionally you may pass in a hash reference which is used to initialize the object. The allowed hash fields are code and term_groups, where code corresponds to the method of the same name, and term_groups is an array reference containing TBX::Min::LangSet objects.
TBX::Min::LangSet
code
term_groups
Get or set the language group language code (should be ISO 639 and 3166, e.g. en-US, de, etc.).
en-US
de
Returns an array ref containing all of the TBX::Min::TIG objects in this concept termEntry. The array ref is the same one used to store the objects internally, so additions or removals from the array will be reflected in future calls to this method.
TBX::Min::TIG
add_term_group
Adds the input TBX::Min::TIG object to the list of language groups contained by this object.
TBX::Min
Nathan Glenn <garfieldnate@gmail.com>, James Hayes <james.s.hayes@gmail.com>
This software is copyright (c) 2016 by Alan Melby.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install TBX::Min, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TBX::Min
CPAN shell
perl -MCPAN -e shell install TBX::Min
For more information on module installation, please visit the detailed CPAN module installation guide.