Giter Club home page Giter Club logo

multilangphp's Introduction

multilangPHP v2.0.1

MBS-PHP MBS-PHP MBS-PHP MBS-PHP MBS-PHP

MBS-master MBS-quality MBS-intelligence

Import the library

require_once("lib/multilang.php");

Using

> How to starting

multilang::setup();

> Set Languages Directory

multilang::set("dir", "../demo/langs/");

before mutlilang::setup();

> GET function

multilang::get($req, $return);
$return what is does
1 return
0 echo
$request what is does output example
lang Gives you the language selected by the user en
dir Gives you the directory ../demo/langs/
log Gives the log of the library array()
log_last Gives the last log the library The current language is set tr
dir&lang Gives the language file directory selected by the user ../demo/langs/tr.php

> List the language in the defined direcory

echo multilang::listlang($returnType);
$returnType what is does output
html Gives languages in html format div.multilang > [a href="?lang=tr" title="language tr"]tr[/a]
array Gives languages in array array('tr' => 'tr.php')

> How to create the language file

For example, the folder with the language files: ../demo/langs/ and we create a language folder in the directory. Create LANGUAGE.php for example az.php

// '../demo/langs/az.php'

$LANG = array(); // We are creating an array called LANG

$LANG['test'] = "Bu bir testdir.";


$LANG['CALLED_NAME'] = "CONTENTS";

> How to get the text

echo multilang::lang($type);

$type is a CALLED NAME

// Example
echo multilang::lang('test'); // Output (return): Bu bir testtir.

Example Using

// index.php
require_once("lib/multilang.php");

multilang::set("dir", "langs/"); // We defined the language directory
multilang::setup(); // We starting the library

echo multilang::lang("test"); // Echo the text

print_r(multilang::get("log", 1)); // Print the log array

multilangphp's People

Contributors

mberatsanli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

multilang rivman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.