PHP Classes

PHP-DS: Translate text in PHP code to different languages

Recommend this page to a friend!
  Info   View files Example   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 182 This week: 1All time: 8,690 This week: 560Up
Version Licenses PHP version Categories
php-ds 1.0.1MIT/X Consortium ...7Localization, PHP 5, Code Generation
Description 

Author

This class can translate text in PHP code to different languages.

It takes an array with different configuration values and generates code for a class with a list of variables and functions.

Applications can retrieve localized texts defined in the configuration array using the generated class variables and functions.

Innovation Award
PHP Programming Innovation award nominee
January 2018
Number 12
This class can translate text in PHP code to different languages.

It takes an array with different configuration values and generates code for a class with a list of variables and functions.

Applications can retrieve localized texts defined in the configuration array using the generated class variables and functions.

Manuel Lemos
Picture of berkay karata?
Name: berkay karata? <contact>
Classes: 1 package by
Country: Turkey Turkey
Age: 25
All time rank: 419675 in Turkey Turkey
Week rank: 411 Up9 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php
#CALL PHP_DS CLASS
$PHP_DS_LANGUAGE="EN";
include(
"../PHP-DS/PHP_DS.php");
#CREATE AN OBJECT FOR PHP_DS
$x = new PHP_DS_SUPPORTED("example-lang/EN.PHP");


//----------------------------------------------------------------------------------------------------
// Let's do our settings
//----------------------------------------------------------------------------------------------------
#Change Class Name
$x->class ="class_name";
#Key Type
$x->using="object";
#Function default indicator
$x->functions_d="A_Function";
#Variable default indicator
$x->variables_d="A_Variable";
//----------------------------------------------------------------------------------------------------
// Let's start creating our code :)
//----------------------------------------------------------------------------------------------------
$x->code='
class class_name
{
public $A_Variable1="its null";
public function A_Function1()
{
  echo $this->A_Variable1;
}
public function A_Function2()
{
  echo "Hello<br>";
}
}
'
;

//----------------------------------------------------------------------------------------------------
// And use our code
//----------------------------------------------------------------------------------------------------
$x->add();
$y = new example;
$y->presentation="I'm PHP-DS. I am a language pack for PHP classes.";
$y->say_hello();
$y->introduce_yourself();


Details

PHP-DS is very simple. You can learn it completely in 16 steps :) : https://github.com/insayd10/PHP-DS/wiki/Learn-PHP-DS-in-16-steps

*

What is PHP-DS?

A completely different i18n experience! * Briefly

You code a class with PHP, and you want your class to be able to translate to multiple languages. As you know, the arrangements made within the file are very troublesome. PHP "PHP-DS", with a different method, allows your classes to have an infrastructure that can support multiple languages.

  • Longish

As you know, OOP (Object Oriented Programming) is already developing a technology by entering our life. The boundaries of OOP are mechul, but the usage is beyond standard. With the same style of coding, we work for different purposes.

Free software, freely reachable We've designed the PHP-DS to make it easy for a class with a large target mass to quickly and easily reach its mass, adapt to its mass. As we can understand, we are not trying to avoid the standard, but we aim to reach them quickly.

We aimed to develop methods that have more than one use of humans. for example, file_upload :: file ($ file) for an upload class; Take a use in the form of. This class owner can create language files using PHP-DS and can use different methods for each language. that is, a method can have more than one use. when writing a code above in an English language using this class, when a Turk uses the same class file_upload :: file ($ file); code. Also, an English "Warning: file type is not supported!" a Turk using the same class "Attention: the file type is not supported." a German, "Vorsicht: dateityp wird nicht unterstützt." you can get the same output as.

  • Maybe

People would still be keeping a more accountable book. a software like excell has provided language support and even the people in the very large age group have become interactive and have incorporated them.

  • On the interface

What is the interface? The concept of an interface is not limited to graphical interfaces. Although graphical interfaces make the end user's work easier, it is inadequate for "intermediate" members which is a new concept today. Araelemenlar, one of the users who like the end users who use the program one click above; a class that is one click away from code generators. Araelemenlar uses the code producers' products to address the end user. Wordpress is a code generator. One person who uses WordPress methods when preparing a template for Wordpress is Araeleman. At this point, the code generators are separate from the graphical interfaces for the intermediate members, so that their products are more demanding; we need an interface development. With its interfaces, it can reach intermediate members from all walks of life, and ultimately reach the end user.


  Files folder image Files  
File Role Description
Files folder imageexamples (3 files, 1 directory)
Files folder imagePHP-DS (1 file, 2 directories)
Accessible without login Plain text file BENI-OKU.md Data Auxiliary data
Accessible without login Plain text file LIES-MICH.md Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  examples  
File Role Description
Files folder imageexample-lang (4 files)
  Accessible without login Plain text file beispiel.php Example Example script
  Accessible without login Plain text file example.php Example Example script
  Accessible without login Plain text file ornek.php Example Example script

  Files folder image Files  /  examples  /  example-lang  
File Role Description
  Accessible without login Plain text file DE.php Conf. Configuration script
  Accessible without login Plain text file EN.php Conf. Configuration script
  Accessible without login Plain text file TR.php Conf. Configuration script
  Accessible without login Plain text file ZH.php Conf. Configuration script

  Files folder image Files  /  PHP-DS  
File Role Description
Files folder imagecore (2 files)
Files folder imagelang (4 files)
  Accessible without login Plain text file PHP_DS.php Example Example script

  Files folder image Files  /  PHP-DS  /  core  
File Role Description
  Plain text file bagimliliklar.php Class Class source
  Plain text file CORE_1-1-0.php Class Class source

  Files folder image Files  /  PHP-DS  /  lang  
File Role Description
  Accessible without login Plain text file DE.php Aux. Auxiliary script
  Accessible without login Plain text file EN.php Aux. Auxiliary script
  Accessible without login Plain text file TR.php Aux. Auxiliary script
  Accessible without login Plain text file ZH.php Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:182
This week:1
All time:8,690
This week:560Up