Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Many PHP projects are using array-like language files instead of Gettext:

$lang = array(
"lib_captcha_head" => "Confirmation Code",
"lib_captcha_insertword" => "Enter the words written below",
"lib_captcha_insertnumbers" => "Enter the spoken Numbers",
"lib_captcha_send" => "Send confirmation Code",

While translating it, I have to repeat select and type translated text in right side. The selection task often require mouse to do a quick selection (e.g. in UltraEdit or Sublime Text 2, I can double clicked the words and drag cursor to quickly select several words), this make terrible of my shoulder :-)

So is there exist any tools for me to simplify this task? For example, can I just use keyboard to navigate and select untranslated strings and input translations?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yes, you can do this with just the keyboard, but this depends on how powerful your editor is.

For example, if you're using Vim, simply stand between the quotes and type:

ci"

...which means: [C]hange what's [I]nside the " charaters. This would delete everything inside the quotes and you'll be able to type the new text.

It you don't want to type these 3 characters again and again and again, do:

:map <C-R> ci"

...which would bind the Control-R key to this command.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.