⧼vector-jumptocontent⧽

API:EPrints/MetaField/Multilang: Difference between revisions

From EPrints Documentation
No edit summary
No edit summary
 
Line 14: Line 14:
<!-- Pod2Wiki=head_synopsis -->
<!-- Pod2Wiki=head_synopsis -->
==SYNOPSIS==
==SYNOPSIS==
<pre> {
<source lang="perl">{
    name =&gt; "title",
name => "title",
    type =&gt; "multilang",
type => "multilang",
    multiple =&gt; 1,
multiple => 1,
    fields =&gt; [
fields => [
      { sub_name =&gt; "title", type =&gt; "text", },
{ sub_name => "title", type => "text", },
    ],
],
  },</pre>
},</source>


<!-- Edit below this comment -->
<!-- Edit below this comment -->
Line 31: Line 31:
not done
not done


<!-- Edit below this comment -->
* $value = $field-&gt;lang_value( $langid, $value )
: Returns the most local language value for $langid.


: If $langid is undefined uses the current language.


<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_lang_value -->
===$value = $field-&gt;lang_value( $langid, $value )===
Returns the most local language value for $langid.
If $langid is undefined uses the current language.
<!-- Edit below this comment -->
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_copyright -->
<!-- Pod2Wiki=head_copyright -->
==COPYRIGHT==
==COPYRIGHT==
Copyright 2000-2011 University of Southampton.
: Copyright 2000-2011 University of Southampton.


This file is part of EPrints http://www.eprints.org/.
: This file is part of EPrints http://www.eprints.org/.


EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
: EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.


EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
: EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.


You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.


<!-- Edit below this comment -->
<!-- Edit below this comment -->

Latest revision as of 09:57, 22 January 2013

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::MetaField::Multilang - Subclass of compound for multilingual data.


SYNOPSIS

{
	name => "title",
	type => "multilang",
	multiple => 1,
	fields => [
		{ sub_name => "title", type => "text", },
	],
},


DESCRIPTION

not done

  • $value = $field->lang_value( $langid, $value )
Returns the most local language value for $langid.
If $langid is undefined uses the current language.

COPYRIGHT

Copyright 2000-2011 University of Southampton.
This file is part of EPrints http://www.eprints.org/.
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.