词条 | LMPHP | |||||||||||||||||||||||||||||||||||||||||||||||||||
释义 |
{{Infobox software }}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
History [9]
Functions [18] [19] [20]
InitialE.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"); WordGetecho $langs -> word_get("Bye"); LanguageAdd$langs -> language_add("en"); $langs -> language_add("ar","Arabic"); LanguageRemove$langs -> language_remove("en"); LanguageActive$langs -> language_active("ar"); LanguageCurrentif($langs -> language_current() == "ar") {} else {} LanguageExistsif($langs -> language_exists("ar")) {} else {} Languagesprint_r( $langs -> languages ); Example [20] [21]/**
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"); ?> References1. ^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. ^1 {{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. ^1 {{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. ^1 {{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. ^1 2 {{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. ^1 {{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条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。