请输入您要查询的百科知识:

 

词条 LMPHP
释义

  1. Functionalities

  2. History [9]

  3. Functions [18] [19] [20]

      Initial    WordAdd    WordAddTo    WordGet    LanguageAdd    LanguageRemove    LanguageActive    LanguageCurrent    LanguageExists    Languages  

  4. Example [20] [21]

      Short Example [5][22] 

  5. References

{{Infobox software
| name = LMPHP, Multi-Language, Language management PHP
| logo =
| logo size = 200px
| caption = Multi-Language PHP - Language management and multi-language supports
| developer = Max Base
| released = 2018
| latest_release_version = 1.1
| latest_release_date = January 2019
| operating_system = Cross-platform
| genre = PHP Library
| license = GNU General Public License v3.0
| website = [https://github.com/BaseMax/LMPHP MultiLanguagePHP at Github]

}}LM PHP[1] (Language management PHP)[2] is a library for language management and multi-language support in the PHP-based application backends. A key feature is supported multi-language in projects. [2] [3]

[https://github.com/BaseMax/LMPHP MultiLanguagePHP] is used primarily for language management and multi-language support.

This library is licensed under GNU General Public License v3.0 [4] and is open-source[5].

This package is published in the Official PHP Classes Repository[6]. [7]

This week, this package was a reason the Max a first-rate win in the USA and ranked 6th in the world. [8]

Functionalities

  • Language management and multi-language support.
  • Enable language with more priority (active a language)
  • Trying to eliminate vocabulary deficiencies in some languages.

History [9]

Version NumDate BeginDate Finish
0.1 (first)20182018-12-01
1.02018-12-012019-01-22
1.12019-01-22 -
  • In 2018, Max Base[10] began designing this library. [11]
  • In 2018, this library was used in one of India's projects for language management. [11]
  • Version 1.0, a nearly complete rewrite is released on Dec 1, 2018.[12]
  • In 2019, the name of this library change from MultiLanguagePHP to LM-PHP. [1][13]
  • Version 1.1, was officially introduced with the new name as LMPHP. [14][15][16]
  • In 2019/01, This package is published in the Official PHP Classes Repository.[6]
  • In 2019/01/25, This package has also been downloaded and used up to 9,384.[8]
  • In 2019/02/27, Rank first in the US (This week)
  • In 2019/03/05, Rank first in the Canada (This week) [17]

Functions [18] [19] [20]

Function NameGoalParameter(s)Return
word_addAdd a word to the active language.$name(name of the word),

Optional : $value(value of the word)

Bool
word_getGet a word from the active language.$name(name of the word)The value of the word.
word_add_toAdd a word to the custom language.$lang(language name),

$name(name of the word),

Optional : $value(value of the word)

Bool
language_addAdd a new language.$key(language name)Bool
language_removeRemove a language.$key(language name)Bool
language_activeActivate a language.$key(language name)Bool
language_currentGet current active language.Name of the active language.
language_existsCheck a language is exists or not.$key(language name)Bool
languageGet the list of the languages or list of the words of a language.Optional : $filter(language name)Array

Initial

E.g.: We define the class in $langs variable.

$langs = new MultiLanguages();

WordAdd

$langs -> word_add("Bye","Good Bye!");

$langs -> word_add("HowAre");

WordAddTo

$langs -> word_add_to("en","Bye","Good Bye!");

$langs -> word_add_to("ar","HowAre");

WordGet

echo $langs -> word_get("Bye");

LanguageAdd

$langs -> language_add("en");

$langs -> language_add("ar","Arabic");

LanguageRemove

$langs -> language_remove("en");

LanguageActive

$langs -> language_active("ar");

LanguageCurrent

if($langs -> language_current() == "ar")

{

}

else

{

}

LanguageExists

if($langs -> language_exists("ar"))

{

}

else

{

}

Languages

print_r( $langs -> languages );

Example [20] [21]

/**

  • @Name : LMPHP (Language management, Multi-Language)
  • @Version : 1.1
  • @Programmer : Max
  • @Date : 2018-12-01 - 2019-01-22
  • @Released under : https://github.com/BaseMax/LMPHP/blob/master/LICENSE
  • @Repository : https://github.com/BaseMax/LMPHP
    • /

include "LMPHP.php";

$langs = new LMPHP();

$langs -> language_add("en");

$langs -> language_add("fa","Farsi");

//$langs -> language_remove("en");

$langs -> language_active("fa");

echo $langs -> language;

print_r( $langs -> languages );

$langs -> language_active("en");

$langs -> word_add("Bye","Good Bye!");

$langs -> language_active("fa");

$langs -> word_add("Hi","Hello!");

$langs -> word_add("HowAre");

$langs -> word_add("HowAre","How are you?");//update a word!

print_r( $langs -> words );

echo $langs -> word_get("Bye");//It should get word from active language(fa) , but this is not exists. so will get value from en.

?>

Short Example [5][22]

include "LMPHP.php";

/////////////////////////////

$langs = new LMPHP();

$langs -> language_add("en","English");

$langs -> language_add("fr","Germany");

$langs -> language_active("en");

$langs -> word_add("Bye","Good Bye!");

$langs -> word_add("HowAre");

$langs -> language_active("fr");

$langs -> word_add("Bye","Au revoir!");

print_r( $langs -> words );

echo $langs -> word_get("Bye");

?>

References

1. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/commit/a492a5fa08e2b82b9f5db2af51de7c23bca1d5bf|title=Set name as LMPHP(LM-PHP).|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
2. ^{{Cite web|url=https://github.com/topics/multilanguage-support?l=php|title=List of all code-repository in the 'multi language-support' category for the PHP.|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
3. ^{{Cite web|url=https://github.com/topics/multi-language?l=php|title=List of all code-repository in the 'multi-language' category for the PHP.|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
4. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/blob/master/LICENSE|title=GNU General Public License v3.0|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
5. ^{{Cite web|url=https://stackoverflow.com/questions/17369947/multi-language-php-script/54275490|title=multilingual - Multi language php script|website=Stack Overflow|access-date=2019-01-20}}
6. ^{{Cite web|url=https://www.phpclasses.org/package/11046-PHP-Support-to-multiple-languages-to-PHP-applications.html|title=LMPHP: Support to multiple languages to PHP applications - PHP Classes|website=www.phpclasses.org|access-date=2019-01-25}}
7. ^{{Cite web|url=https://redsign.cloud/hu/fejlesztes/php-classes-ujdonsagok|title=PHP Classes {{!}} RedSign Cloud|last=|first=|date=|website=redsign.cloud|archive-url=|archive-date=|dead-url=|access-date=2019-02-28}}
8. ^{{Cite web|url=https://web.archive.org/web/20190125113349/https://www.phpclasses.org/package/11046-PHP-Support-to-multiple-languages-to-PHP-applications.html|title=LMPHP: Support to multiple languages to PHP applications - PHP Classes|date=2019-01-25|website=web.archive.org|access-date=2019-01-25}}
9. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/commit/3c4ec6efc699e83352f1b7c537a3bf35ceed38df|title=History version table with date (Ver 1.0 and1.1)|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
10. ^{{Cite web|url=https://github.com/BaseMax|title=Max Base - Profile|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
11. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/blob/master/README.md|title=README|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
12. ^{{Cite web|url=https://github.com/BaseMax/LMPHP|title=Code Repository|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
13. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/commit/6c9876ac9fa15a3115e74ede944d79ca6788cbb6|title=Update and rename MultiLanguages.php to LMPHP.php|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
14. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/commit/10cece484c25eefe6c85deb5212ea44885b862d5|title=Change the name of the class.|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
15. ^{{Cite web|url=https://basemax.github.io/2019/01/22/what-is-the-LMPHP.html|title=What is the LMPHP?|date=2019-01-22|website=Max|language=en|access-date=2019-01-21}}
16. ^{{Cite web|url=https://packagist.org/packages/basemax/lmphp|title=basemax/lmphp - Packagist|website=packagist.org|access-date=2019-01-22}}
17. ^{{Cite web|url=https://web.archive.org/web/20190305154625/https://www.phpclasses.org/browse/author/1515828.html|title=Classes of Max Base - PHP Classes|date=2019-03-05|website=web.archive.org|access-date=2019-03-05}}
18. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/blob/master/README.md|title=Name Functions|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
19. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/blob/master/LMPHP.php|title=Source Code|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
20. ^{{Citation|last=Example Using|first=|title=Multi-language management and support on the site.: BaseMax/LMPHP|date=|url=https://github.com/BaseMax/LMPHP|volume=|pages=|access-date=}}
21. ^{{Cite web|url=https://github.com/BaseMax/LMPHP/commit/10cece484c25eefe6c85deb5212ea44885b862d5|title=Update Sample.php for the new name. (LMPHP)|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}
22. ^{{Cite web|url=https://stackoverflow.com/posts/54275490/revisions|title=Rename 'MultiLanguages' to 'LMPHP' in the stackoverflow answer.|last=|first=|date=|website=|archive-url=|archive-date=|dead-url=|access-date=}}

3 : PHP libraries|PHP software|Free software programmed in PHP

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 3:16:13