android - PhoneGap Custom Language setup -


i have tried many examples , non of them work.here want do. have phonegap eclipse project.here project structure

enter image description here

i want add custom language project. here mainactivity.java

import org.apache.cordova.droidgap;  import android.os.bundle;  public class mainactivity extends droidgap {   @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);         super.loadurl("file:///android_asset/www/index.html");   } } 

here index.html

 <!doctype html>  <html>   <head>   <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-   scale=1, minimum-scale=1, width=device-width;" />   <title>directory reader</title>   <link rel="stylesheet" href="jquery/jquery.mobile-1.1.1.min.css" />   <script src="jquery/jquery-1.8.0.min.js"></script>   <script src="jquery/jquery.mobile-1.1.1.min.js"></script>     <script type="text/javascript" src="cordova-2.0.0.js"></script>    <style type="text/css">   @font-face {    font-family: mycustomfont;    src: url("notosanssinhala-regular.eot") /* eot file ie */   }    @font-face {    font-family: mycustomfont;    src: url("notosanssinhala-regular.ttf") /* ttf file css3 browsers */   }    body {   font-family: mycustomfont, verdana, arial, sans-serif;   font-size: medium;   color: black   }   </style>    </head>  <body>   <p> test goda </p>  </div>  </body>  </html> 

still font want display not showing on mobile device.its shows english characters "test goda". idea how slove this?

you need root device install sinhala text on android 4.4 , works on android 5.0+

you need below steps :

  1. copy font files /system/fonts
  2. download fallback_fonts.xml file /etc
  3. open fallback_fonts.xml file , modify adding font names .copy file /etc directory.
  4. change permissions of fallback_fonts.xml file , font files 644 or -rw-r–r–

plese see read instructions screenhots here


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -