Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatable & CRUD Translation #53

Closed
PhouvanhKCSV opened this issue Jul 6, 2016 · 6 comments
Closed

Datatable & CRUD Translation #53

PhouvanhKCSV opened this issue Jul 6, 2016 · 6 comments

Comments

@PhouvanhKCSV
Copy link

I want to translate Datatable to Lao, so i duplicated "resources/lang/vendor/backpack/en" to "lo", i can translate:

// Create form
'add' => 'ເພີ່ມ',
'back_to_all' => 'ກັບຄືນສູ່ລາຍການ ',
'cancel' => 'ຍົກເລີກ',
'add_a_new' => 'ເພີ່ມ ',

    // Create form - advanced options
    'after_saving'            => 'ຫຼັງຈາກບັນທຶກ',
    'go_to_the_table_view'    => 'ໄປທີ່ລາຍການທັງໝົດ',
    'let_me_add_another_item' => 'ເພີ່ມລາຍການໃໝ່ອີກ',
    'edit_the_new_item'       => 'ແກ້ໄຂລາຍການທີ່ເພີ່ມ',

// Edit form
'edit'                 => 'ແກ້ໄຂ',
'save'                 => 'ບັນທຶກ',

but below comment "// DataTables translation" are not effected, it is still show in English

Please help, Thanks

@tabacitu
Copy link
Member

tabacitu commented Jul 6, 2016

Hi @PhouvanhKCSV,

Can you show me the entire lang file, after you translated it, please? I'm sure there's a comma missing or something silly like that.

Cheers!

@PhouvanhKCSV
Copy link
Author

@tabacitu here is it (resources/lang/vendor/backpack/lo/crud.php)

'ເພີ່ມ', 'back_to_all' => 'ກັບຄືນສູ່ລາຍການ ', 'cancel' => 'ຍົກເລີກ', 'add_a_new' => 'ເພີ່ມ ', // Create form - advanced options 'after_saving' => 'ຫຼັງຈາກບັນທຶກ', 'go_to_the_table_view' => 'ໄປທີ່ລາຍການທັງໝົດ', 'let_me_add_another_item' => 'ເພີ່ມລາຍການໃໝ່ອີກ', 'edit_the_new_item' => 'ແກ້ໄຂລາຍການທີ່ເພີ່ມ', // Edit form 'edit' => 'ແກ້ໄຂ', 'save' => 'ບັນທຶກ', // CRUD table view 'all' => 'ທັງໝົດ ', 'in_the_database' => 'ໃນຖານຂໍ້ມູນ', 'list' => 'ລາຍການ', 'actions' => '', 'preview' => 'Preview', 'delete' => 'ລຶບ', 'admin' => 'ຜູ້ດູແລລະບົບ', 'details_row' => 'ນີ້ແມ່ນລາຍລະອຽດຂອງແຖວ. ທ່ານສາມາດແກ້ໄຂຕາມຕ້ອງການ.', 'details_row_loading_error' => 'ເກີດຂໍ້ຜິດພາດໃນການໂຫຼດຂ້ມູນເພີ່ມເຕີມ. ກະລຸນາລອງອີກຄັ້ງ.', // Confirmation messages and bubbles 'delete_confirm' => 'ທ່ານແນ່ໃຈບໍ່ທີ່ຈະລຶບລາຍການນີ້?', 'delete_confirmation_title' => 'ລສຍການຖືກລຶບແລ້ວ', 'delete_confirmation_message' => 'ລາຍການນີ້ຖືກລຶບສົມບຸນແລ້ວ.', 'delete_confirmation_not_title' => 'ບໍ່ຖືກລຶບ', 'delete_confirmation_not_message' => "ເກີດຂໍ້ຜິດພາດຂື້ນ. ລາຍການຂອງທ່ານອາດຈະບໍ່ທັນຖືກລຶບ.", 'delete_confirmation_not_deleted_title' => 'ບໍ່ຖືກລຶບ', 'delete_confirmation_not_deleted_message' => 'ບໍ່ມີການກໍະທໍາໃດໆເກີດຂຶ້ນ.', // DataTables translation 'emptyTable' => 'ບໍ່ພົບຂໍ້ມູນໃດໆ', 'info' => 'ສະແດງ _START_ ເຖິງ _END_ ຈາກ _TOTAL_ ລາຍການ', 'infoEmpty' => 'ສະແດງ 0 ເຖິງ 0 ຈາກ 0 ລາຍການ', 'infoFiltered' => '(ຄັດກອງຈາກ ທັງໝົດ _MAX_ ລາຍການ)', 'infoPostFix' => '', 'thousands' => ',', 'lengthMenu' => '_MENU_ ລາຍການຕໍ່ໜ້າ', 'loadingRecords' => 'ກໍາລັງໂຫຼດຂໍ້ມູນ...', 'processing' => 'ກໍາລັງດໍາເນີນການ...', 'search' => 'ຄົ້ນຫາ: ', 'zeroRecords' => 'ບໍ່ພົບລາຍການໃດໆ', 'paginate' => [ 'first' => 'ທໍາອິດ', 'last' => 'ສຸດທ້າຍ', 'next' => 'ຕໍ່ໄປ', 'previous' => 'ກ່ອນໜ້າ', ], 'aria' => [ 'sortAscending' => ': ເປີດໃຊ້ງານເພື່ອຈັດລຽງແຕ່ໜ້ອຍຫາຫຼາຍ', 'sortDescending' => ': ເປີດໃຊ້ງານເພື່ອຈັດລຽງແຕ່ຫຼາຍຫາໜ້ອຍ', ], // global crud - errors 'unauthorized_access' => 'ບໍ່ໄດ້ຮັບອານຸຍາດ - ທ່ານບໍ່ມີສິດທິພຽງພໍໃນການເບິ່ງໜ້ານີ້.', 'please_fix' => 'ກະລຸນາແກ້ໄຂຂໍ້ຜິດພາດດັ່ງນີ້:', // global crud - success / error notification bubbles 'insert_success' => 'ຂໍ້ມູນຖືກເພີ່ມສໍາເລັດແລ້ວ.', 'update_success' => 'ຂໍ້ມູນຖືກແກ້ໄຊສໍາເລັດແລ້ວ.', // CRUD reorder view 'reorder' => 'ຈັດລຽງຄືນໃໝ່', 'reorder_text' => 'ໃຊ້ drag&drop ເພື່ອຈັດລຽງ.', 'reorder_success_title' => 'ສໍໍາເລັດ', 'reorder_success_message' => 'ການຈັດລຽງຂອງທ່ານຖືກບັນທຶກແລ້ວ.', 'reorder_error_title' => 'ຜິດພາດ', 'reorder_error_message' => 'ການຈັດລຽງຂອງທ່ານຍັງບໍ່ຖືກບັນທຶກ.', // Fields 'browse_uploads' => 'ຄົ້ນຫາໄໍຟ້ລ', 'clear' => 'ລຶບ', 'page_link' => 'Page link', 'page_link_placeholder' => 'http://example.com/your-desired-page', 'internal_link' => 'ລິ້ງພາຍໃນ', 'internal_link_placeholder' => 'Internal slug. Ex: \'admin/page\' (no quotes) for \':url\'', 'external_link' => 'ລິ້ງພາຍນອກ', ``` ];

@tabacitu
Copy link
Member

Sorry for the delay. It works for me. I just copy-pasted your file, switched the laravel language to 'lo' and all translations seem to be there, even after the "// DataTables translation" comment:

screen shot 2016-07-13 at 12 36 06
screen shot 2016-07-13 at 12 36 22

Did it work for you too after all?

Here's what I pasted:

<?php

return [

/*
|--------------------------------------------------------------------------
| Dick Crud Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the CRUD interface.
| You are free to change them to anything
| you want to customize your views to better match your application.
|
*/

// Create form
'add'                 => 'ເພີ່ມ',
'back_to_all'         => 'ກັບຄືນສູ່ລາຍການ ',
'cancel'              => 'ຍົກເລີກ',
'add_a_new'           => 'ເພີ່ມ ',

    // Create form - advanced options
    'after_saving'            => 'ຫຼັງຈາກບັນທຶກ',
    'go_to_the_table_view'    => 'ໄປທີ່ລາຍການທັງໝົດ',
    'let_me_add_another_item' => 'ເພີ່ມລາຍການໃໝ່ອີກ',
    'edit_the_new_item'       => 'ແກ້ໄຂລາຍການທີ່ເພີ່ມ',

// Edit form
'edit'                 => 'ແກ້ໄຂ',
'save'                 => 'ບັນທຶກ',

// CRUD table view
'all'                       => 'ທັງໝົດ ',
'in_the_database'           => 'ໃນຖານຂໍ້ມູນ',
'list'                      => 'ລາຍການ',
'actions'                   => '',
'preview'                   => 'Preview',
'delete'                    => 'ລຶບ',
'admin'                     => 'ຜູ້ດູແລລະບົບ',
'details_row'               => 'ນີ້ແມ່ນລາຍລະອຽດຂອງແຖວ. ທ່ານສາມາດແກ້ໄຂຕາມຕ້ອງການ.',
'details_row_loading_error' => 'ເກີດຂໍ້ຜິດພາດໃນການໂຫຼດຂ້ມູນເພີ່ມເຕີມ. ກະລຸນາລອງອີກຄັ້ງ.',

    // Confirmation messages and bubbles
    'delete_confirm'                              => 'ທ່ານແນ່ໃຈບໍ່ທີ່ຈະລຶບລາຍການນີ້?',
    'delete_confirmation_title'                   => 'ລສຍການຖືກລຶບແລ້ວ',
    'delete_confirmation_message'                 => 'ລາຍການນີ້ຖືກລຶບສົມບຸນແລ້ວ.',
    'delete_confirmation_not_title'               => 'ບໍ່ຖືກລຶບ',
    'delete_confirmation_not_message'             => "ເກີດຂໍ້ຜິດພາດຂື້ນ. ລາຍການຂອງທ່ານອາດຈະບໍ່ທັນຖືກລຶບ.",
    'delete_confirmation_not_deleted_title'       => 'ບໍ່ຖືກລຶບ',
    'delete_confirmation_not_deleted_message'     => 'ບໍ່ມີການກໍະທໍາໃດໆເກີດຂຶ້ນ.',

    // DataTables translation
    'emptyTable'     => 'ບໍ່ພົບຂໍ້ມູນໃດໆ',
    'info'           => 'ສະແດງ _START_ ເຖິງ _END_ ຈາກ _TOTAL_ ລາຍການ',
    'infoEmpty'      => 'ສະແດງ 0 ເຖິງ 0 ຈາກ 0 ລາຍການ',
    'infoFiltered'   => '(ຄັດກອງຈາກ ທັງໝົດ _MAX_ ລາຍການ)',
    'infoPostFix'    => '',
    'thousands'      => ',',
    'lengthMenu'     => '_MENU_ ລາຍການຕໍ່ໜ້າ',
    'loadingRecords' => 'ກໍາລັງໂຫຼດຂໍ້ມູນ...',
    'processing'     => 'ກໍາລັງດໍາເນີນການ...',
    'search'         => 'ຄົ້ນຫາ: ',
    'zeroRecords'    => 'ບໍ່ພົບລາຍການໃດໆ',
    'paginate'       => [
        'first'    => 'ທໍາອິດ',
        'last'     => 'ສຸດທ້າຍ',
        'next'     => 'ຕໍ່ໄປ',
        'previous' => 'ກ່ອນໜ້າ',
    ],
    'aria' => [
        'sortAscending'  => ': ເປີດໃຊ້ງານເພື່ອຈັດລຽງແຕ່ໜ້ອຍຫາຫຼາຍ',
        'sortDescending' => ': ເປີດໃຊ້ງານເພື່ອຈັດລຽງແຕ່ຫຼາຍຫາໜ້ອຍ',
    ],

// global crud - errors
'unauthorized_access' => 'ບໍ່ໄດ້ຮັບອານຸຍາດ - ທ່ານບໍ່ມີສິດທິພຽງພໍໃນການເບິ່ງໜ້ານີ້.',
'please_fix' => 'ກະລຸນາແກ້ໄຂຂໍ້ຜິດພາດດັ່ງນີ້:',

// global crud - success / error notification bubbles
'insert_success' => 'ຂໍ້ມູນຖືກເພີ່ມສໍາເລັດແລ້ວ.',
'update_success' => 'ຂໍ້ມູນຖືກແກ້ໄຊສໍາເລັດແລ້ວ.',

// CRUD reorder view
'reorder'                      => 'ຈັດລຽງຄືນໃໝ່',
'reorder_text'                 => 'ໃຊ້ drag&drop ເພື່ອຈັດລຽງ.',
'reorder_success_title'        => 'ສໍໍາເລັດ',
'reorder_success_message'      => 'ການຈັດລຽງຂອງທ່ານຖືກບັນທຶກແລ້ວ.',
'reorder_error_title'          => 'ຜິດພາດ',
'reorder_error_message'        => 'ການຈັດລຽງຂອງທ່ານຍັງບໍ່ຖືກບັນທຶກ.',

// Fields
'browse_uploads' => 'ຄົ້ນຫາໄໍຟ້ລ',
'clear' => 'ລຶບ',
'page_link' => 'Page link',
'page_link_placeholder' => 'http://example.com/your-desired-page',
'internal_link' => 'ລິ້ງພາຍໃນ',
'internal_link_placeholder' => 'Internal slug. Ex: \'admin/page\' (no quotes) for \':url\'',
'external_link' => 'ລິ້ງພາຍນອກ',
];

@tabacitu
Copy link
Member

Hi @PhouvanhKCSV . Any updates on this? Can I close the issue?

Also, is you've already translated it, I'd love it if you submitted a pull request when you have the time, so that everyone has your translation. Thanks, cheers!

@PhouvanhKCSV
Copy link
Author

PhouvanhKCSV commented Jul 27, 2016

@tabacitu Thanks Tabacitu, The problem is solved, i will submit a pull request when it is completely translate.

@tabacitu
Copy link
Member

Great to hear that! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants