How to localize whole Jamroom project into other language?

Masahito Kaizaka A
Masahito Kaizaka A
@masahito-kaizaka-p
9 years ago
3 posts
I'm a Jamroom user in Japan.
I think I'd like to spread Jamroom's usage and utility within Japan.
For that reason, it is necessary to localize into Japanese.

Every module has a "Language" tab and I can localize per module there, but it is not enough.
I want to localize also ACP, Error Message, etc... into Japanese, but unfortunately these are often hard-coded.
Is there a good idea that I'm able to localize WHOLE Jamroom project into other language?

I'm sorry for my poor English. I'm glad if someone give an opinion.
updated by @masahito-kaizaka-p: 08/19/16 11:00:44AM
michael
@michael
9 years ago
7,806 posts
Hi masahito san,

Sounds like a great idea.

Probably the best way to do it is to look in each of the modules and duplicate the language folders.

For example, in the audio module, its located at:
/modules/jrAudio/lang/en-US.php

The contents of it look like this:
// Profile Menu Entry Name
$lang['menu'] = 'audio';

// Keys
$lang[1]  = 'play';
$lang[2]  = 'pause';
$lang[3]  = 'stop';
$lang[4]  = 'mute';
$lang[5]  = 'unmute';
$lang[6]  = 'max volume';
$lang[7]  = 'repeat';
$lang[8]  = 'repeat off';
$lang[9]  = 'create';
$lang[10] = 'title';
$lang[11] = 'Enter a title for the audio file - this will be shown your profile.';
$lang[12] = 'genre';
$lang[13] = 'If you have already entered genres in other audio files, you may select any previous genre, or enter a new genre in text field';
$lang[14] = 'audio file';
$lang[15] = 'select and upload the audio file.';
$lang[16] = 'cover image';
$lang[17] = 'if you would like to associate an image file with this audio file, upload it here. If you do not select a cover image and there is an embedded image in the MP3 file(s), it will be used.';
$lang[18] = 'An error was encountered creating the audio file - please try again.';
$lang[19] = 'The audio file was successfully created!';
$lang[20] = 'Invalid id - please pass in a valid audio id.';
$lang[21] = 'The audio entry was not found in the datastore - please try again.';
$lang[22] = 'create audio file';
$lang[23] = 'update audio file';
$lang[24] = 'update';
$lang[25] = 'The audio file was successfully updated!';
$lang[26] = 'length';
$lang[27] = 'bitrate';
$lang[28] = 'sample rate';
$lang[29] = 'upload a new audio file';
$lang[30] = 'upload a new audio image';
$lang[31] = 'album';
$lang[32] = 'If this audio file is part of an album, enter the album name here.';
$lang[33] = 'Posted a new Audio File';
$lang[34] = 'Albums';
$lang[35] = 'create album';
$lang[36] = 'album audio files';
$lang[37] = 'Select all the audio files that belong to this album - they will be saved individually so they can be edited.';
$lang[38] = 'select audio files';
$lang[39] = 'select cover image';
$lang[40] = 'This audio file is currently being processed and will appear here when complete.';
$lang[41] = 'Audio';
$lang[42] = 'genres';
$lang[43] = 'Flash Required';
$lang[44] = 'previous';
$lang[45] = 'next';
$lang[46] = 'shuffle';
$lang[47] = 'shuffle off';
$lang[48] = 'Update Required';
$lang[49] = 'To play the media you will need to either update your browser to a recent version or update your';
$lang[50] = 'Flash plugin';
$lang[51] = 'streams';
$lang[52] = 'audio tracks';
$lang[53] = 'no audio files were found';
$lang[54] = 'purchase';
$lang[55] = 'Updated an Audio File';
$lang[56] = 'delete album';
$lang[57] = 'Are you sure you want to delete this album?';
$lang[58] = 'You forgot to select an Audio File to upload';
$lang[59] = 'Created a new Audio Album';
$lang[60] = 'modify album';
$lang[61] = 'invalid album name - please try again';
$lang[62] = 'unable to find any audio files that are part of this album';
$lang[63] = 'Updated an Audio Album';
$lang[64] = 'Download this album';
$lang[65] = 'download';
$lang[66] = 'Upload Audio';

Those are the language strings for english. If you wanted to have a japanese version that shipped with the module, we could include that with any of the modules for japanese users.

if you created a file at ja-JP.php
/modules/jrAudio/lang/ja-JP.php

Those language strings get imported when the module is installed.

To have a FULL japanese version, including the control panel we would need to convert all the modules.

It would be a big task, because after they were translated, they would need to be checked to make sure they still make sense.

---
Another issue is support for only japanese speaking customers, how would that be handled?

If you would like to try I would like to help. I can make sure all the language strings are made available for translation.
updated by @michael: 05/06/16 02:38:53AM
michael
@michael
9 years ago
7,806 posts
There are actually a couple of ways to do it, and which way you do it depends on your skills. The way above is the way a web developer would probably want to do it.

If you're not a web developer, but want to localize your site, you can do it from the ACP.

Go to:
your-site.com/user/create_language

and add ja-JP

Then in each of the modules you will see a LANGUAGE tab. Switch to the ja-JP version and translate those strings.

Each user has an account settings page at:
your-site.com/user/account/profile_id=1/user_id=1

where they can select their language. Whichever language they select is the language that will be shown.
Masahito Kaizaka A
Masahito Kaizaka A
@masahito-kaizaka-p
9 years ago
3 posts
Mr.Michael, thanks for your reply to my question.

I'm a web developer, so I can understand both ways you said.
If the first way (using a language file such as ja-JP.php), it seems to be easy that I will apply Japanese localization to other Jamroom projects.

Localizing whole Jamroom project including ACP into Japanese looks difficult after all because it may have been hard-coded.
I think I'll try from where I can.

Jamroom is very good framework and I suppose it will be popular in Japan... I want to be.
I may post other questions again if there is anything.
brian
@brian
9 years ago
10,149 posts
Thanks for the good feedback on Jamroom - it's awesome that you'd like to get it translated into Japanese.

One thing that is important for us is that when a user has questions about how to do something in JR, we can point them to a specific location - i.e. "click on ACP -> Core -> Core -> Global Config", etc.

If these values are modifiable, it makes it difficult for us to support the product, so at this time there's no plans to break out the master-admin only strings in the Jamroom ACP into language files.

I know that doesn't help you, and sorry for that - hopefully you know why that's hard for us to do.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Masahito Kaizaka A
Masahito Kaizaka A
@masahito-kaizaka-p
9 years ago
3 posts
Mr.Brian, thanks for your reply.

brian:
If these values are modifiable, it makes it difficult for us to support the product, so at this time there's no plans to break out the master-admin only strings in the Jamroom ACP into language files.
I see. I can understand the reason why language strings in ACP are not modifiable.
Also I know its difficulty. Localizing only modules is quite a hard work (^_^;

Tags