Posts Tagged ‘flag’

Linux: How to change recursively directory permissions to executable (+x) flag

Monday, September 2nd, 2013

change recursively permissions of directories and subdirectories Linux and Unix with find command
I had to copy large directory from one Linux server to windows host via SFTP proto (with WinSCP). However some of directories to be copied lacked executable flag, thus WinSCP failed to list and copy them.

Therefore I needed way to set recursively, all sub-directories under directory /mirror (located on Linux server) to +x executable flag.

There are two ways to do that one is directly through find cmd, second by using find with xargs
Here is how to do it with find:

# find /mirror -type d -exec chmod 755 {} + Same done with find + xargs:

# find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
To change permissions only to all files under /mirror server directory with find

# find /path/to/base/dir -type f -exec chmod 644 {} +

Same done with find + xargs:
# find /path/to/base/dir -type f -print0 | xargs -0 chmod 644

Also, tiny shell script that recursively changes directories permissions (autochmod_directories.sh) is here

We are 300 million. We are Slavonic! – Нас 300 миллионов! Мы Славяне!!!

Saturday, January 19th, 2013

Some might be puzzled to know about 300 million of inhabitants of the world are Slavonic and speak some kind of Slavonic language. This is almost 6% of the population. Slavonic languages are easy to comprehend. It is curious fact that until 10 years ago about half of the books in the world were in Slavonic or some kind of variation of Slavonic. Russians, Macedonians, Serbians, Slovenians, Czechs, Bulgarians, Belaruse, Croatia, Bosnia & Herzegovina, Ukraine, Slovakia, Monte Negro, Poland, Khazakstan. It plenty of people. Obviously it is most likely that the better integration between nations happens based on cultural and language criterias. As all Slavonics more or less share certain similar cultural heritage (at least more closer between each other than to Western Culture), it is good and logical Slavonic nations to unite and be in economic union.
Today I had the opportunity to be unexpectedly guest in Macedonian family. It was quite interesting to find out the food they eat, the language and the people habits and manners are mostly the same as Bulgarians. It was clear that we're one nation, so we had to act like this. I've been once in Slovenia and I had similar observations, it seems Slovenian language is a mixture of ancient Bulgarian, little latin, Serbian and some Germanic. My observations on meeting with different cultures shows it is much easier to understand each other with other Slavians, than with Western People. Probably it is similar if not the same between French, Belgium, German and Dutch.

If the European Union want to survive therefore obviously it should concentrate on unification of two blocks pretty much like the Roman Empire. Instead of trying to create one united megapolis under the flag of some unreal unrealistic slogans.
 

We are 300 million. We are Slavonic! – Нас 300 миллионов! Мы Славяне!!!

 

How to add multi language support to wordpress with qTranslate

Monday, October 3rd, 2011

QTRanslate WordPress Language Translate Screenshot 1

Lately, I have to deal with some wordpress based installs in big part of my working time. One of the wordpress sites needed to have added a multi language support.

My first research in Google pointed me to WPML Multilingual CMS The WordPress Multilingual Plugin
WPML Multilingual CMS looks nice and easy to use but unfortunately its paid, the company couldn’t afford to pay for the plugin so I looked forward online for a free alternative and stumbled upon QTranslate

QTranslate is free and very easy to install. Its installed the wordpress classic way and the installation went smoothly, e.g.:

1. Download and unzip QTranslate

# cd /var/www/blog/wp-content/plugins
/var/www/blog/wp-content/plugins# wget http://downloads.wordpress.org/plugin/qtranslate.2.5.24.zip
...
/var/www/blog/wp-content/plugins# unzip qtranslate.2.5.24.zip
...

Just for fun and in case the plugin disappears in future, a mirror of Qtranslate 2.5.24 is found here

2. Enable QTranslate from wordpress admin

Plugins -> Inactive -> qTranslate (Activate)

After activating the plugin, there is a Settings button from which qTranslate‘s various plugin parameteres can be tuned.

qTranslate WordPress translate screenshot 2

In my case my site had to support both English and Arabic, so from the settings I added support for Arabic translation to the wordpress install.

Adding Arabic is done in the following way:

a. From the Language Management (qTranslate Configuration) from the Languages menu and the Languages (Add Languages) I had to choose a language code (in my case a language code of ar – for Arabic). Next I had to choose the Arabic flag from the follow up flag list.

In next text box Name , again I had to fill Arabic, for Locale en_US.UTF-8
The following Date Format and Time Format text boxes are optional so I left them blank.
To complete the process of adding the Arabic as a new language wordpress should support I pressed the Add Language button and the Arabic got added as a second language.

Afterwards the Arabic was added as second language, on the bottom of the left wordpress menu pane a button allowing a switch between English, Arabic appeared (see below screenshot):

MultiLingual WordPress with qTranslate

Finally to make Arabic appear as a second language of choice on the website I added it as a Widget in the Widgets menu from the AWidgets menu:

Appearance -> Widgets

In widgets I added qTranslate Language Chooser to the Sidebar without putting any kind of Title for qtranslate widget .
I found it most helpful to choose the Text and Image as an option on how to display the Language switching in the wp.