[ACR-824]Added guide for utils_i18n_uversion 89/150989/6
authorLukasz Pik <lu.pik@samsung.com>
Tue, 19 Sep 2017 09:13:45 +0000 (11:13 +0200)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Thu, 21 Sep 2017 08:15:58 +0000 (11:15 +0300)
PS4: Reviewed
PS6: Added missing </li> tag

Change-Id: I002d5e072d5fca8009e3781820283ef993a28379
Signed-off-by: Lukasz Pik <lu.pik@samsung.com>
org.tizen.guides/html/native/internationalization/i18n_n.htm

index 42c7258..105b4de 100644 (file)
@@ -51,6 +51,7 @@
                        <li><a href="#uenum">Managing Enumerations</a></li>
                        <li><a href="#tmz">Managing Time Zones</a></li>
                        <li><a href="#manage_uset">Managing Sets</a></li>
+                       <li><a href="#manage_version">Retrieving the ICU Version</a></li>
                </ul>
                <p class="toc-title">Related Info</p>
                <ul class="toc">
        <li>Managing locales and time zones
        <p>You can use the Ulocale functions to <a href="#ulocale">tailor information according to a specific geographical, cultural, or political region</a>. With the Timezone functions, you can <a href="#tmz">get the time zone name, ID, DST settings, raw offset, and region code</a>.</p>
        </li>
+       <li>Retrieving the ICU version
+       <p>You can <a href="#manage_version">retrieve the currently-used version of the ICU library</a> with Uversion.</p>
+       <div class="note">
+       <strong>Note</strong>
+       The Uversion API is supported since Tizen 4.0.
+       </div>
+       </li>
 </ul>
 
 <h2 id="ubrk" name="ubrk">Location Boundaries with Ubrk</h2>
@@ -1335,6 +1343,35 @@ i18n_ubool contains = i18n_uset_contains_string(set, input_ustring, -1);
 </li>
 </ol>
 
+<h2 id="manage_version" name="manage_version">Retrieving the ICU Version</h2>
+
+<p>Since Tizen 4.0, you can retrieve the current ICU library version by using the Uversion API.</p>
+<p>To retrieve the current version:</p>
+<ol>
+       <li>To get the current ICU version, use the <code>i18n_uversion_get_version()</code> function, which returns the version number in a <code>uversion</code> array, in hexadecimal format:
+<pre class="prettyprint">
+i18n_uversion_info array;
+i18n_uversion_get_version(array);
+</pre>
+       </li>
+       <li>To convert the version number between hexadecimal and dotted decimal format:
+       <ul>
+               <li>To convert the version number from hexadecimal format into a string in dotted decimal format, use the <code>i18n_uversion_to_string()</code> function:
+<pre class="prettyprint">
+char *decimal_version;
+i18n_uversion_to_string(array, decimal_version);
+</pre>
+               </li>
+               <li>To convert the version number from a string in dotted decimal format to hexadecimal format, use the <code>i18n_uversion_from_string()</code> function:
+<pre class="prettyprint">
+char *decimal_version = "57.1";
+i18n_uversion_from_string(decimal_version, version);
+</pre>
+               <p>If your source string is of the <code>i18n_uchar</code> type, use the <code>i18n_uversion_from_ustring()</code> function instead.</p>
+               </li>
+       </ul></li>
+</ol>
+
 <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
 <script type="text/javascript" src="../../scripts/showhide.js"></script>
 </div></div></div>