Showing posts with label Inroduction. Show all posts
Showing posts with label Inroduction. Show all posts

Tuesday, June 09, 2015

[PrestaShop][EN]Let’s start to use PrestaShop Automatic Translations.

[Installation][PrestaShop] Using PrestaShop Translations with web hosting, it’s always found some problem in translation module as follows:

PHP message (some hosting)
Warning! Your hosting provider is using the Suhosin patch for PHP, which limits the maximum number of fields allowed in a form: 1000 สำหรับ suhosin.post.max_vars
1000 สำหรับ suhosin.request.max_vars
Please ask your hosting provider to increase the Suhosin limit to 3603 at least, or you will have to edit the translation files.

Future more, when you translate other languages you will always have many problems and you need to spend a lot of time to translate by yourselves, so I have developed a small application for translating both of translate individual and translate with google translation for easy to use it.
Finally, it’s free for used.

Let’s start to use PrestaShop Automatic Translations.

Download






Saturday, June 06, 2015

[PrestaShop][EN] how to use Multilanguage in PrestaShop website Part 1 Describing structure in PrestaShop 1.6

 [PrestaShop][EN] how to use Multilanguage in PrestaShop website Part 1 Describing structure in PrestaShop 1.6

1. Structure in PrestaShop
            Translations Folder means a part of PHP files that contain language files, in the folder, each of PHP files are proceeded detail of language overall system both of front end and back end



            Modules Folder means a part of 2 main folders that are Views and Translations


                        Views means a template that contains all tags can display by PHP Smarty, all files are named *.tpl


                        Translations means each of language files that translates only a module that cannot relates with main structure of system, in the module,  which usually consists of a filename based on the country for examples; en.php (English), th.php (Thailand), and ja.php ( Japan)



P.S. Both of views and translations can put on the same folder in the some modules, especially, in the PrestaShop older version such as > 1.6



Thursday, June 04, 2015

[swift] Hello Swift [part 2]

[swift] Hello Swift [part 2]
The conclusion before writing Swift language

7.  Passing parameter with inout keyword
Assigning reference value of Swift language can use inout keyword and when you pass object by argument you will use & in front of object name
Be careful, inout keyword cannot set object when you declare object with let,var keyword

8.  Returning data type from function or method
Some function, when you declare function or method, you want to return something from the function you may use -> to declare it
For example:  
func plus(x:Int,y:Int)->Int{
return x+y
}

9. Data Type in swift
Currently, data type on Swift are contained in struct no matter primitive or classes
Int , String are Value Type
class is Reference Type

10.  Declaring constructor in Swift
You may create constructor of class in Swift by init keyword as follow:
init(){
}
It’s pattern similar to method, but it’s constructor that is called automatically when you create new instance of object

11. Using for Loop
Using for lop as if you create one or many statement you must need { } sign
12.  Assigning value have to be space
Assigning variables, Space is always required such as var temp = “temp value”


Hopefully, it will be prepared to use Swift language perfectly, good luck all.
Bottom of Form

[swift] Hello Swift

[swift] Hello Swift
The conclusion before writing Swift language
1. let using let keyword
let lang= "Swift"
println("Oh my \(lang)")
2. Using comment can be used // or /*… */
the comment on Swift is still c-style :
// for single line
/*
*/ for multiline

3. Assigning variable both of var and let
let use for the variable cannot be changed value if you want to change value on runtime you could use var keyword

4. The end of statement
When the end of statement unnecessary use ; if the statement is too short, you use ; for create next statement

 5.  Don’t worry about break keyword
for c-style, writing the code for condition switch, often you miss break keyword it makes the code run out of command but the Swift language prevent it
6. Writing method with func keyword
When you create method or function, the easy keyword you can write func
Top of Form


to be continued…