• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Linux and Localization Tutorial Paras pradhan Senior Linux ...
 

Linux and Localization Tutorial Paras pradhan Senior Linux ...

on

  • 1,396 views

 

Statistics

Views

Total Views
1,396
Views on SlideShare
1,396
Embed Views
0

Actions

Likes
2
Downloads
24
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Linux and Localization Tutorial Paras pradhan Senior Linux ... Linux and Localization Tutorial Paras pradhan Senior Linux ... Presentation Transcript

    • Linux and Localization Tutorial Paras pradhan Senior Linux Developer Madan puraskar pustakalaya Lalitpur Nepal [email_address]
    • About Linux:
      • Operating system that was initially created by Linus Torvalds at early 90s
      • Name of the core kernel
      • If surrounded by utilities and applications then it is a distro
      • Linux = Linux is not Unix
      • Linux is free and Opensource
      • Cane be redistributed and modified
      • Based on GPL (GNU Public Licensed)
      • Comments from some experts:
      • "Linux, it turns out, was no intentional masterstroke, but an incremental process, a combination of experiments, ideas, and tiny scraps of code that gradually coalesced into an organic whole." - Glyn Moody, Wired
      • “ Once the system is at the edge of chaos, we are bound to see surprises. Linux is one such system that has come to dazzle us all. “ – Ko Kuwabara
      • History : 1971 - The first edition of the Unix server operating system emerges from Bell Labs. 1985 – Richard Stallman publishes his famous "GNU Manifesto", one of the first documents of the open-source revolution. 1991 - In August, Torvalds announces his plans to create a free operating system on the Minix users newsgroup. He modestly notes in his posting that his OS is "just a hobby”. In October, Linux 0.01 is released on the Internet under a GNU public license. 1992 + - Different Linux Distributions started . E.g: debian linux , slackware linux etc
      About Linux: contd...
    • About Linux: contd...
      • Official site kernel.org
      • Sister site linuxhq.com
      • Current Kernel version is 2.6.x
    • About Linux: contd...
      • Linux distro:
      • Collection of Linux Kernel + GNU softwares/tools. like:
        • Yast installer
        • Kernel
        • Gcc
        • Kudzu
        • Open Office
        • GNU Cash
        • Dpkg , Rpm
        • Examples of Popular GNU/Linux Distributions
      • Debian GNU/Linux
      • Redhat Linux
      • SUSE linux
    • About Linux: contd...
      • Getting linux :
      • Internet Download
      • CDROM
      • CDROM in a Book
      • Which linux distro?
      • Depends upon use
      • For Servers, most popular are Redhat, Debian, Fedora
      • For Desktops, most popular are suse, mandrake, debian, mepis, knoppix etc
      • Installation :
      • From CD, internet
      • Needs Linux native and swap filesystems
      • Package managers(most popular)
      • pkgtool, autopackag etc
      • rpm and dpkg
    • About Linux: contd...
      • Linux updating:
        • From packages
        • From inernet using tools like up2date, redhat network, yum etc
      • Starting process of Linux:
      • 1)Boot Manager
      • 2)Kernel
      • 3)Initialization Scripts
      • 4)Login
      • 5)Shell
      • 6)Window Managers
      • 7)Desktop
      • 8)Applications
    • About Linux: contd...
      • Window managers and desktop environments:
        • windomaker
        • gnome
        • kde
        • xface
      • Editors :
        • pico, emacs, bluefish
      • Web browsers and mail clients:
        • Mozilla, firefox, thunderbird etc
    • About Linux: contd...
      • For programmers:
        • c++ , python, php, perl etc
        • Perl
        • Python
        • PHP
        • Tcl
        • Ada
        • GDB
        • Glade
        • Tcl/Tk
      • Databases :
        • Mysql, oracle, postgre
    • About Linux: contd...
      • Gnu and openSource
        • Project in Free Software Foundation (FSF)
        • URL – http//www.gnu.org/fsf/fsf.html
        • Organization that maintain and collect many free software
        • Ex. bash, gcc, linux, make and etc...
        • GNU stand for Gnu ‘s Not Unix
        • URL http://www.gnu.org
        • Initiated by Richard Stallman since 1984
        • GNU and OpenSource softwares can be available from freshmeat.net,
        • sourceforge.net, gnu.org etc
    • About Linux: contd...
      • OpenSource:
        • Source code of softwares available in openSource softwares
        • Can be modified as per need
        • Redistribute the modified software maintaining the licenscing criteria
        • Commercial company make use of openSource software for ex: redhat,
        • abria soft, miktotik etc
      • Uses of Linux at various sectors:
        • Education
        • Data centeres
        • ISPs
        • Commercial appliance productions
    • About Linux: contd...
      • Linux and Networks:
        • ISPs and NSPs
        • Web hosting company
        • Big networks of school and universites
        • Network servers and services as: PDC, DHCP, NAT, NIS, NFS, FTP etc
        • Can support all network protocols as TCP/IP, IPX/SPX etc
        • All protocols in Kernel
        • QoS
    • About Nepalinux:
      • A linux distribution
      • Mostly for Desktop usage
      • Nepali unicode support
      • Nepali user interfaces in many office and other applications like:
      • gnucash, nautils, gedit , openoffice etc
      • Tools like nepali spellchecker , thesaurus for nepali language will be
        • integrated
      • Can also be used by the community who doesn't know English
      • Government , private sectors , education sector can use it freely
        • with no price
      • Zero price or will be freely available for download or Cds from MPP
      • Nepali unicode support
      • Can run without installing to Hard disks
      • why nepalinux?
        • Not bound to other commercial distributions
        • Zero price or free
        • Nepali Unicode support
        • Nepali utilities will be integrated
    • Basics of Linux Localization
      • i18n(Internationalization and why i18n:
        • User wants to work in his native language
        • Most software assume user knows english
        • I18nizing a program allows support for
          • Input
          • Processing & Storage
          • Display
          • Printing
        • Potentially handle multiple languages, customs in the world
        • Displaying characters for the users' native languages.
        • Inputing characters for the users' native languages.
        • Handling popular encodings for the users' native languages.
        • Displaying messages in users' native languages.
        • Character classification & sorting.
        • Some the internationaliuzed softwares are:
          • gnome and gnome apps
          • kde
          • pango
          • QT
          • ICU
    • Basics of Linux Localization contd....
      • L10n (Localization) and why l10n:
        • Implementation of a specific language for an already internationalized
          • software.
        • Adapting a program to a given culture
        • Cultural Parameters
        • Language rules
        • Script – character set
        • Date , time , currency
        • Graphics & Icons
    • Basics of Linux Localization contd....
      • GNU gettext for localization:
        • Tool to internationalize messages of the software outputs according to
          • locale status
        • simple process:
          • a) Coding using gettext support ( in C include <libintl.h>
            • #include <locale.h> ,#define _(String) gettext((String)) )
              • can be used
          • b) generate POT files of the program
          • c) translate POT
          • d) change it to PO and then MO
          • e) copy it to related location
          • f) test it using setting the locale and running the application
    • Basics of Linux Localization contd....
      • Locale:
        • Part of glibc
        • Every lanugae must have it's own locale
        • Many localized tools are dependent on locale
        • Nepali locale developed and submitted by MPP and named as ne_NP
        • Locale created using locale definiation file.
    • Basics of Linux Localization contd....
      • Locale definiation file's contents and defniation
        • LC_CTYPE - Category related to encodings.
        • Character testing functions such as islower() , multibyte character functions
        • LC_COLLATE - Category related to sorting. strcoll()
        • LC_MESSAGES - Category related to the language for messages the software
          • outputs. This category is used for gettext.
        • LC_MONETARY - Format to show monetary numbers,
          • Currency symbol,comma or period, columns,
        • LC_NUMERIC - Number format to show, Position of decimal
        • Digit seperators
        • LC_TIME - Category related to format to show time and date, such as name
      • of months and weeks, order of date, month, and year, and so on.
        • New categories
          • LC_PAPER
          • LC_IDENTIFICATION
          • LC_ADDRESS
    • Basics of Linux Localization contd....
      • Input system for Linux
        • Used for input of characters. In our case input of nepali characters
        • There are many input systems
          • i) xkb
          • ii)iiimf
          • iii) scim
        • Xkb limitations
        • Xkb and iiimf used at mpp for nepalinux
        • Both romanized and traditional keyboard layouts already developed
    • Basics of Linux Localization contd....
      • Fonts in Linux:
      • a)8bit TTF limited to 256 glyphs (200 usable)
      • b)16bit Unicode TTF cover unicode ranges. upto 65,000 glyphs
      • c)Opentype – for advanced typography GSUB, GPOS tables,useful for
      • complex scripts like Indic , Tibetan need cluster formation & ligature rules
      • Ttf and otf are being used for nepalinux
      • Rules can be added to otf fonts
      • Types:
        • bdf fonts:
          • rendered by X
    • Basics of Linux Localization contd....
        • freetpye:
          • ttf rendering
          • rendering sclabale fonts
          • anti aliasing
          • suport for opentype table
          • auto hinting
        • opentype:
          • otf fonts rendering
          • opentype fonts rendered by xft/fontconfig
          • gsub, gpos support
          • rules based
      • tools:
        • fontforge, fontlab etc
    • Basics of Linux Localization contd....
      • Gnome rendering, pango, freetype and xft:
        • rendering done in gnome by pango
        • modular
        • Text handling
        • supports unicode chars
        • Supports bitmap, Type1 , TTF and OpenType fonts
        • Rendering modules for Arabic, Indic, Thai, CJK etc
        • rendering using FreeType library and Xft/Fontconfig
    • Basics of Linux Localization contd....
      • Printing:
        • Gnome 2.8 use pango engine
        • Gnome 2.6 uses libgnomeprint
        • X apps use Xprint ( has dev support )
        • KDE use Qprinter of QT
        • Mozilla uses mozprint + xprint and pango
        • Openoffice uses ICU
      • Gnome localization:
        • Status in l10n.gnome.org
        • Translation of gnome 2.8.x is being done
        • Usi ng POT files for tranlslation
      • tools used are poedit, kbabble etc
      • Kde localization:
        • not done
    • Basics of Linux Localization contd....
      • Openoffice.org and localization
        • Complete office suite
        • Replacement for MS Office
        • Just announced the localization at l10n.openoffice.org
        • Localization of 2.0
        • Localization processs involved
          • a) Announcing
          • b) Adding Languages
          • c) Creation of openoffice locales
          • d) UI translation
          • e) Creating patch for localization
          • f) Build the localized nepali openoffice
        • Will be integrated with nepalinux
        • Will support almost all linux distribution and most probably for windows.
        • Develop Nepali Spellchecker for openoffice.org
    • Basics of Linux Localization contd....
      • Mozilla localization, rendering , printing
        • Web browser with email client
        • Most of the the localization is done at MPP
        • Localization involves
          • a) Adding languange
          • b) UI translation
          • c) Enabling CTL and necessary parameters
          • d) Build
          • e) Genereate the installter and localize the installer if possible
        • Version used is 1.7
        • Rendering and printing done by mozprint, xprint and pango
        • Printing support is not done completely at MPP and undergoing.
    • Basics of Linux Localization contd....
      • Localization and translate tools:
        • Translate tool used for mozilla , openoffice , gnome apps etc
        • Mozilla translator for mozilla
        • Kabbel
        • Gtranslator
        • Poedit
        • More
    • Linux Localization Tutorial
      • Linux installation:
        • Boot from CD
        • Make / , swap partitions and Linux native ext3 , Linux swap partition
      • and follow the normal process
        • Select packages
        • Install boot loader as grub, lilo etc
    • Linux Localization Tutorial contd....
      • Locale installation:
        • Locale defination file is ne_NP
        • Basic process ( distro neutral) :
      • a) Remove the previous one if exist
      • command: rm -rf /usr/lib/locale/ne_NP
      • b)cp /usr/share/i18n/charmaps/UTF-8.gz /tmp
      • c)/bin/gunzip -d /tmp/UTF-8.gz
        • d)Download ne_NP from http://www.nepalinux.org/ldf/ne_NP
      • e) /usr/bin/localedef -i ne_NP -f /tmp/UTF-8 /usr/lib/locale/ne_NP
      • f) check by using locale -a
    • Linux Localization Tutorial contd....
      • Fonts installation:
        • Download samanata.ttf from http://www.nepalinux.org/fonts/ samanata.ttf
        • mkdir -p /usr/share/fonts/default/npfonts
        • cp -f samanatha.ttf /usr/share/fonts/default/npfonts/
        • fc-cache -f
        • fc-list to view installed fonts
        • Note: On FC3 system download kalimati.otf file for better rendering and install
    • Linux Localization Tutorial contd....
      • Running Nepali Gnome:
      • 1)export LC_ALL=ne_NP will change defaulf locale for nepali env.
      • 2)startx to see nepali Gnome
      • OR
      • 1)Edit locale.aliases of gdm folder
      • 2)Add ' Nepali' ne_NP
      • 3)Select Nepali on Languges select option of gdm login screen
      • 4)Login to see nepali Gnome
    • Linux Localization Tutorial contd....
      • Input system:
      • A) xkb
          • Note: only romanizied
        • Download ne file from http://www.nepalinux.org/input/
        • cp -f files/ne /usr/X11R6/lib/X11/xkb/symbols/pc
        • cp -f files/ne /usr/X11R6/lib/X11/xkb/symbols
        • Add the following lins on /usr/X11R6/lib/X11/xkb/rules/xorg.xml
          • or /usr/X11R6/lib/X11/xkb/rules/xfree86.xml
          • <layout>
          • <configItem>
          • <name>ne</name>
          • <description>Nepali_Romanized</description>
          • </configItem>
          • <variantList/>
          • </layout>
    • Linux Localization Tutorial contd....
      • Adding Nepali Roman keyboard utility in Gnome desktop bottom panel
        • On the buttom panel right
      • 1) Right click the mouse
      • 2) Click &quot;Add to Panel&quot;
      • 3) Click &quot;Keyboard indicator&quot;
      • 4) Click the &quot;ADD&quot; button
      • 5) Right click the added icon
      • 6) Click &quot;Open keyboard preferences&quot;
      • 7) Click the &quot;Layout&quot; tab
      • 8) Select &quot;Nepali_Romanized&quot; from available layouts
      • 9) Click &quot;ADD and Close&quot;
      • 10) Open Gedit and try to type, you will get Nepali characters
      • 11)Enjoy !
    • Linux Localization Tutorial contd....
      • B) iiimf:
      • Both traditional and romanzied can be done
      • Download npkeybt.data and npkeybr.data from http://www.nepalinux.org/input
      • Dowload required packages for iiimf
      • IIMF in Debian:
      • a) for debian (http://www.debian.org)
      • iiimf-htt-csconv 11.4.1870-7 Codeset Conversion modules for IIIMF
      • components
      • ii iiimf-htt-le-indic 11.4.1870-7 UNIT language engine for iiimf-htt-server
      • ii iiimf-htt-server 11.4.1870-7 Htt input method server
      • ii iiimf-htt-xbe 11.4.1870-7 IIIMF Htt XIM BackEnd module
      • ii iiimgcf 11.4.1870-7 IIIM GTK+ 2.x Input Method Module Client
      • ii libiiimcf2 11.4.1870-7 Internet/Intranet Input Method Client
      • Framework library
      • ii libiiimp0 11.4.1870-7 Internet/Intranet Input Method Protocol
      • library
    • Linux Localization Tutorial contd.... b) install them using dpkg -i package name mkdir -p /usr/lib/im/locale/UNIT/NEPALI/data d) cp npkeybt.data /usr/lib/im/locale/UNIT/NEPALI/data e) cp npkeybr.data /usr/lib/im/locale/UNIT/NEPALI/data f)add the following to /usr/lib/im/locale/UNIT/sysime.cfg [ ne_NP ] npkeybt common/ctim.so NEPALI npkeybr common/ctim.so NEPALI Restart iiimf using, /etc/init.d/iiimf-htt-server start e)Using iiimf: Open xterm export GTK_IM_MODULE=iiim gedit , oowriter etc Press ctrl +o Press f5 and f6 to get nepali traditional and romanized input.
    • Linux Localization Tutorial contd....
      • IIIMF in FC3:
      • a)For fc3 download from ( http://fedora.redhat.com ) or from fc3 Cds.
      • b)rpm -ivh iiim*
      • c)mkdir -p /usr/lib/im/locale/UNIT/NEPALI/data
      • d)cp npkeybt.data /usr/lib/im/locale/UNIT/NEPALI/data
      • e)cp npkeybr.data /usr/lib/im/locale/UNIT/NEPALI/data
      • f)add the following to /usr/lib/im/locale/UNIT/sysime.cfg
      • [ ne_NP ]
      • npkeybt common/ctim.so NEPALI
      • npkeybr common/ctim.so NEPALI
      • g)Restart iiimf using, /etc/init.d/iiimf-htt-server start
    • Linux Localization Tutorial contd.... e)Using iiimf: Create symlinks: ln -s /etc/X11/xinit/xinput.d/iiimf /etc/alternatives/xinput-ne_NP ln -s /etc/alternatives/xinput-ne_NP /etc/X11/xinit/xinput.d/ne_NP OR # Adding keyboard utility in Gnome desktop bottom panel On the buttom panel right 1) Right click the mouse 2) Click &quot;Add to Panel&quot; 3) Click &quot;GTK input method&quot; 4) Click the &quot;ADD&quot; button 5) Right click the added icon 6) Select unitle 7)Press f5 and f6 to get nepali traditional and romanized input.
    • Linux Localization Tutorial contd....
      • Linux customization:
      • use of debootstrap and sid for debian
      • knoppix or morphix customization
      • Linux from scratch
    • Linux Localization Tutorial contd....
      • Translation of gnome or gnu apps
        • using gettext tools
          • cp /usr/share/locale/ne/LC_MESSAGES/gedit-2.6.mo /
        • msgunfmt -o gedit-2.6.po gedit-2.6.mo
        • Edit the file
        • msgfmt -o gedit-2.6.mo gedit-2.6.po
        • cp gedit-2.6.mo /usr/share/locale/ne/LC_MESSAGES/
        • run gedit to check
    • Linux Localization Tutorial contd....
      • Nepalinux CD demo :
        • Based on debian sid and knoppix based morphix linux
        • Live cd
        • Can be install on hard disk
      • Nelp for fc3:
      • a) Download nelp1.tar.gz from http://www.nepalinux.org/fc3/
      • b) tar -zxvf nelp1.tar.sh
      • c)cd nelp1
      • d) ./nelp.sh keyhelp
      • e) ./nelp.sh install
      • Debian Linux tutorials:
        • url ( debian.org)
        • use of sid
        • use of apt-get
        • use of dpkg
    • Download this slide from: http://www.nepalinux.org/linuxtutorial.ppt
    • Thank You
    • Questions ?