Tag Archives: translation

Laravel, confide translations / new names – confide::confide

So, imagine that we are using Laravel and creating a new form…

 <div class="form-group">
 <label for="nif">{{{ Lang::get('confide::confide.nif') }}}</label>
 <input class="form-control" placeholder="{{{ Lang::get('confide::confide.nif') }}}" type="text"
 name="nif" id="nif" value="{{{ Input::old('nif') }}}">
 </div>

We will see returned confide::confide.nif and not anything else…
How do we solve this?

Inside /app/lang/pt/ (pt is my default language… you should use yours…….) create the following file: confide.php and with a structure like the other files (duplicate,rename and change it) inside that folder create the new entries…

<?php
return array(
 /*
 |--------------------------------------------------------------------------
 | Confide Language Lines
 |--------------------------------------------------------------------------
 |
 | The following language lines contain the default error messages used by
 | the validator class. Some of these rules have multiple versions such
 | such as the size rules. Feel free to tweak each of these messages.
 |
 */
 "nome_completo" => "Nome completo",
 "morada" => "Morada",
 
 "nif" => "NIF",
 "email_confirmacao" => "Email Confirmação",

We now, have to CALL confide.nif and not confide::confide.nif.

Read more at
http://stackoverflow.com/questions/19338437/override-package-localization-in-laravel
https://github.com/laravel/framework/issues/2467#issuecomment-26211312
http://laravel.com/docs/localization#language-files

 

 

WordPress – languages, translations – edit them!

I’m using Poedit to make the translations.
You can download it from their official website http://www.poedit.net/.

Well, lets start!

Locate your .po file of your theme folder.
I had to make some changes on it, with a text editor – I used coda -.
I had to change the “X-Poedit-SearchPath-0” to my correct path one or poedit crashed.

Make the translations!
You can hit Validate and Update but only when you close Poeditor the .mo file is updated!

I’v uploaded the new file to my theme_name/languages/ folder under pt_PT.po and pt_PT.mo.

This way I was seeing the translated items in the Admin board etc.