mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
607 lines
29 KiB
HTML
607 lines
29 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:07 CEST 2017 -->
|
|
<title>I18NBundle (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="I18NBundle (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":10,"i5":10,"i6":9,"i7":10,"i8":9,"i9":10,"i10":9,"i11":9};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/I18NBundle.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
libgdx API
|
|
<style>
|
|
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
|
|
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
|
|
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
|
|
.TableHeadingColor { background:#EEEEFF; }
|
|
a { text-decoration:none }
|
|
a:hover { text-decoration:underline }
|
|
a:link, a:visited { color:blue }
|
|
table { border:0px }
|
|
.TableRowColor td:first-child { border-left:1px solid black }
|
|
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
|
|
hr { border:0px; border-bottom:1px solid #333366; }
|
|
</style>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/utils/IdentityMap.html" title="class in com.badlogic.gdx.utils"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/utils/I18NBundle.html" target="_top">Frames</a></li>
|
|
<li><a href="I18NBundle.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx.utils</div>
|
|
<h2 title="Class I18NBundle" class="title">Class I18NBundle</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.badlogic.gdx.utils.I18NBundle</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">I18NBundle</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">A <code>I18NBundle</code> provides <code>Locale</code>-specific resources loaded from property files. A bundle contains a number of named
|
|
resources, whose names and values are <code>Strings</code>. A bundle may have a parent bundle, and when a resource is not found in a
|
|
bundle, the parent bundle is searched for the resource. If the fallback mechanism reaches the base bundle and still can't find
|
|
the resource it throws a <code>MissingResourceException</code>.
|
|
|
|
<ul>
|
|
<li>All bundles for the same group of resources share a common base bundle. This base bundle acts as the root and is the last
|
|
fallback in case none of its children was able to respond to a request.</li>
|
|
<li>The first level contains changes between different languages. Only the differences between a language and the language of
|
|
the base bundle need to be handled by a language-specific <code>I18NBundle</code>.</li>
|
|
<li>The second level contains changes between different countries that use the same language. Only the differences between a
|
|
country and the country of the language bundle need to be handled by a country-specific <code>I18NBundle</code>.</li>
|
|
<li>The third level contains changes that don't have a geographic reason (e.g. changes that where made at some point in time
|
|
like <code>PREEURO</code> where the currency of come countries changed. The country bundle would return the current currency (Euro)
|
|
and the <code>PREEURO</code> variant bundle would return the old currency (e.g. DM for Germany).</li>
|
|
</ul>
|
|
|
|
<strong>Examples</strong>
|
|
<ul>
|
|
<li>BaseName (base bundle)
|
|
<li>BaseName_de (german language bundle)
|
|
<li>BaseName_fr (french language bundle)
|
|
<li>BaseName_de_DE (bundle with Germany specific resources in german)
|
|
<li>BaseName_de_CH (bundle with Switzerland specific resources in german)
|
|
<li>BaseName_fr_CH (bundle with Switzerland specific resources in french)
|
|
<li>BaseName_de_DE_PREEURO (bundle with Germany specific resources in german of the time before the Euro)
|
|
<li>BaseName_fr_FR_PREEURO (bundle with France specific resources in french of the time before the Euro)
|
|
</ul>
|
|
|
|
It's also possible to create variants for languages or countries. This can be done by just skipping the country or language
|
|
abbreviation: BaseName_us__POSIX or BaseName__DE_PREEURO. But it's not allowed to circumvent both language and country:
|
|
BaseName___VARIANT is illegal.</div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>davebaol</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../com/badlogic/gdx/utils/PropertiesUtils.html" title="class in com.badlogic.gdx.utils"><code>PropertiesUtils</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#I18NBundle--">I18NBundle</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#createBundle-com.badlogic.gdx.files.FileHandle-">createBundle</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle)</code>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code>, the default locale and the default encoding "UTF-8".</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#createBundle-com.badlogic.gdx.files.FileHandle-java.util.Locale-">createBundle</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle,
|
|
java.util.Locale locale)</code>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code> and <code>locale</code>; the default encoding "UTF-8"
|
|
is used.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#createBundle-com.badlogic.gdx.files.FileHandle-java.util.Locale-java.lang.String-">createBundle</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle,
|
|
java.util.Locale locale,
|
|
java.lang.String encoding)</code>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code>, <code>locale</code> and <code>encoding</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#createBundle-com.badlogic.gdx.files.FileHandle-java.lang.String-">createBundle</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle,
|
|
java.lang.String encoding)</code>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code> and <code>encoding</code>; the default locale is used.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#format-java.lang.String-java.lang.Object...-">format</a></span>(java.lang.String key,
|
|
java.lang.Object... args)</code>
|
|
<div class="block">Gets the string with the specified key from this bundle or one of its parent after replacing the given arguments if they
|
|
occur.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#get-java.lang.String-">get</a></span>(java.lang.String key)</code>
|
|
<div class="block">Gets a string for the given key from this bundle or one of its parents.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#getExceptionOnMissingKey--">getExceptionOnMissingKey</a></span>()</code>
|
|
<div class="block">Returns the flag indicating whether to throw a <code>MissingResourceException</code> from the <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#get-java.lang.String-"><code>get(key)</code></a>
|
|
method if no string for the given key can be found.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Locale</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#getLocale--">getLocale</a></span>()</code>
|
|
<div class="block">Returns the locale of this bundle.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#getSimpleFormatter--">getSimpleFormatter</a></span>()</code>
|
|
<div class="block">Returns the flag indicating whether to use the simplified message pattern syntax (default is false).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#load-java.io.Reader-">load</a></span>(java.io.Reader reader)</code>
|
|
<div class="block">Load the properties from the specified reader.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#setExceptionOnMissingKey-boolean-">setExceptionOnMissingKey</a></span>(boolean enabled)</code>
|
|
<div class="block">Sets the flag indicating whether to throw a <code>MissingResourceException</code> from the <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#get-java.lang.String-"><code>get(key)</code></a> method
|
|
if no string for the given key can be found.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#setSimpleFormatter-boolean-">setSimpleFormatter</a></span>(boolean enabled)</code>
|
|
<div class="block">Sets the flag indicating whether to use the simplified message pattern.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="I18NBundle--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>I18NBundle</h4>
|
|
<pre>public I18NBundle()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getSimpleFormatter--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSimpleFormatter</h4>
|
|
<pre>public static boolean getSimpleFormatter()</pre>
|
|
<div class="block">Returns the flag indicating whether to use the simplified message pattern syntax (default is false). This flag is always
|
|
assumed to be true on GWT backend.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setSimpleFormatter-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSimpleFormatter</h4>
|
|
<pre>public static void setSimpleFormatter(boolean enabled)</pre>
|
|
<div class="block">Sets the flag indicating whether to use the simplified message pattern. The flag must be set before calling the factory
|
|
methods <code>createBundle</code>. Notice that this method has no effect on the GWT backend where it's always assumed to be true.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getExceptionOnMissingKey--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getExceptionOnMissingKey</h4>
|
|
<pre>public static boolean getExceptionOnMissingKey()</pre>
|
|
<div class="block">Returns the flag indicating whether to throw a <code>MissingResourceException</code> from the <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#get-java.lang.String-"><code>get(key)</code></a>
|
|
method if no string for the given key can be found. If this flag is <code>false</code> the missing key surrounded by <code>???</code>
|
|
is returned.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setExceptionOnMissingKey-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setExceptionOnMissingKey</h4>
|
|
<pre>public static void setExceptionOnMissingKey(boolean enabled)</pre>
|
|
<div class="block">Sets the flag indicating whether to throw a <code>MissingResourceException</code> from the <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#get-java.lang.String-"><code>get(key)</code></a> method
|
|
if no string for the given key can be found. If this flag is <code>false</code> the missing key surrounded by <code>???</code> is
|
|
returned.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="createBundle-com.badlogic.gdx.files.FileHandle-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createBundle</h4>
|
|
<pre>public static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a> createBundle(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle)</pre>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code>, the default locale and the default encoding "UTF-8".</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>baseFileHandle</code> - the file handle to the base of the bundle</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a bundle for the given base file handle and the default locale</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if <code>baseFileHandle</code> is <code>null</code></dd>
|
|
<dd><code>java.util.MissingResourceException</code> - if no bundle for the specified base file handle can be found</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="createBundle-com.badlogic.gdx.files.FileHandle-java.util.Locale-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createBundle</h4>
|
|
<pre>public static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a> createBundle(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle,
|
|
java.util.Locale locale)</pre>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code> and <code>locale</code>; the default encoding "UTF-8"
|
|
is used.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>baseFileHandle</code> - the file handle to the base of the bundle</dd>
|
|
<dd><code>locale</code> - the locale for which a bundle is desired</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a bundle for the given base file handle and locale</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if <code>baseFileHandle</code> or <code>locale</code> is <code>null</code></dd>
|
|
<dd><code>java.util.MissingResourceException</code> - if no bundle for the specified base file handle can be found</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="createBundle-com.badlogic.gdx.files.FileHandle-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createBundle</h4>
|
|
<pre>public static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a> createBundle(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle,
|
|
java.lang.String encoding)</pre>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code> and <code>encoding</code>; the default locale is used.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>baseFileHandle</code> - the file handle to the base of the bundle</dd>
|
|
<dd><code>encoding</code> - the charter encoding</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a bundle for the given base file handle and locale</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if <code>baseFileHandle</code> or <code>encoding</code> is <code>null</code></dd>
|
|
<dd><code>java.util.MissingResourceException</code> - if no bundle for the specified base file handle can be found</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="createBundle-com.badlogic.gdx.files.FileHandle-java.util.Locale-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createBundle</h4>
|
|
<pre>public static <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html" title="class in com.badlogic.gdx.utils">I18NBundle</a> createBundle(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> baseFileHandle,
|
|
java.util.Locale locale,
|
|
java.lang.String encoding)</pre>
|
|
<div class="block">Creates a new bundle using the specified <code>baseFileHandle</code>, <code>locale</code> and <code>encoding</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>baseFileHandle</code> - the file handle to the base of the bundle</dd>
|
|
<dd><code>locale</code> - the locale for which a bundle is desired</dd>
|
|
<dd><code>encoding</code> - the charter encoding</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a bundle for the given base file handle and locale</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if <code>baseFileHandle</code>, <code>locale</code> or <code>encoding</code> is
|
|
<code>null</code></dd>
|
|
<dd><code>java.util.MissingResourceException</code> - if no bundle for the specified base file handle can be found</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="load-java.io.Reader-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>load</h4>
|
|
<pre>protected void load(java.io.Reader reader)
|
|
throws java.io.IOException</pre>
|
|
<div class="block">Load the properties from the specified reader.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>reader</code> - the reader</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.io.IOException</code> - if an error occurred when reading from the input stream.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getLocale--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLocale</h4>
|
|
<pre>public java.util.Locale getLocale()</pre>
|
|
<div class="block">Returns the locale of this bundle. This method can be used after a call to <code>createBundle()</code> to determine whether
|
|
the resource bundle returned really corresponds to the requested locale or is a fallback.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the locale of this bundle</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public final java.lang.String get(java.lang.String key)</pre>
|
|
<div class="block">Gets a string for the given key from this bundle or one of its parents.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key for the desired string</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the string for the given key or the key surrounded by <code>???</code> if it cannot be found and
|
|
<a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#getExceptionOnMissingKey--"><code>getExceptionOnMissingKey()</code></a> returns <code>false</code></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code></dd>
|
|
<dd><code>java.util.MissingResourceException</code> - if no string for the given key can be found and <a href="../../../../com/badlogic/gdx/utils/I18NBundle.html#getExceptionOnMissingKey--"><code>getExceptionOnMissingKey()</code></a>
|
|
returns <code>true</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="format-java.lang.String-java.lang.Object...-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>format</h4>
|
|
<pre>public java.lang.String format(java.lang.String key,
|
|
java.lang.Object... args)</pre>
|
|
<div class="block">Gets the string with the specified key from this bundle or one of its parent after replacing the given arguments if they
|
|
occur.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key for the desired string</dd>
|
|
<dd><code>args</code> - the arguments to be replaced in the string associated to the given key.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the string for the given key formatted with the given arguments</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code></dd>
|
|
<dd><code>java.util.MissingResourceException</code> - if no string for the given key can be found</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/I18NBundle.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/utils/IdentityMap.html" title="class in com.badlogic.gdx.utils"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/utils/I18NBundle.html" target="_top">Frames</a></li>
|
|
<li><a href="I18NBundle.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|