OXID Community Forum

> International Forums > Installation and configuration > OXID CE 4.5 - Custom language
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: OXID CE 4.5 - Custom language


Reply
 
Thread Tools Display Modes
#Top   #1  
Old 02-15-2012, 09:54 PM
karlis1989's Avatar
karlis1989 karlis1989 is offline
Junior Member
Join Date: Apr 2010
Location: Latvia
Posts: 20
karlis1989 is on a distinguished road
Send a message via Skype™ to karlis1989
Question OXID CE 4.5 - Custom language

Hello, it's Kārlis K. here ... after quite a while I've set up a new OXID e-Commerce equipped website, and unfortunately I'm experiencing some issues with it.

I'm trying to get the interface translated on the Shop Frontend into Latvian language and experiencing problems when trying to implement it. I'm using the "Azure" theme and I have the language files ( lang.php and map.php) from it translated(was done by someone else, but after i've checked - nothing indicates of a problem within the files) ... i tried to simply copy "en" folder and set it up as "lv" for Latvian language to see if that works, but it doesn't - when the custom language is enabled in frontend it opens "http://<domain>/startseite" instead of what i suppose it should open: "http://<domain>/lv/home" ... which when i try to open by hand it responds with "file not found" ... everything was done according to the available tutorials(which are heavily outdated).

-Kārlis K.-
Reply With Quote
#Top   #2  
Old 02-16-2012, 08:34 AM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is offline
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,093
Marco Steinhaeuser is on a distinguished road
Default Re: OXID CE 4.5 - Custom language

Helllo karlis,

Quote:
Originally Posted by karlis1989 View Post
the available tutorials(which are heavily outdated).
Yes, that's probably the main point - we changed the behaviour since < 4.5.0 a bit. Like now, the following files shall be translated (if you use azure only, map files cannot be translated actually):

/setup/{LOCALE}/lang.php
/out/admin/{LOCALE}/help_lang.php
/out/admin/{LOCALE}/lang.php
/out/azure/{LOCALE}/lang.php
/out/azure/{LOCALE}/theme_options.php
/out/basic/{LOCALE}/lang.php
/out/{LOCALE}/lang.php

Copy this files into the according folders on your server depending on the language (/lv/ in your case).
Now register the new language in admin panel.
Update the views in admin via "tools".
Clear your tmp folder.

Everything shall work now properly.

I'd appreciate if you were interested in contributing your translation to the community.

Good luck!
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #3  
Old 02-16-2012, 08:47 AM
karlis1989's Avatar
karlis1989 karlis1989 is offline
Junior Member
Join Date: Apr 2010
Location: Latvia
Posts: 20
karlis1989 is on a distinguished road
Send a message via Skype™ to karlis1989
Default Re: OXID CE 4.5 - Custom language

Aha, so the map file is to be left alone, got it. As for contributing, i'm looking forward to it when the translated files are working proppertly and aren't causing any errors or problems. Thanks for pointing the right way - i searched for the exact info you gave me, but did not find it anywhere for version 4.5

EDIT: Didn't seem to work :/

So, to attempt to find the cause of why the translations didn't work, what i tried to get another added language working:

1)Copy "en" folders in
/setup/
/out/admin/
/out/azure/
/out/basic/
/out/


2)Then rename them to "lv" so i end up with
/setup/lv/
/out/admin/lv/
/out/azure/lv/
/out/basic/lv/
/out/lv/


3)Change the language name from "English" to "Latvian" in all the files within the folders stated in "2)"

4)Log into Administration panel and add a new Language with the following settings:
Active in Frontend - check
Abbreviation - lv
Name - Latvian

5)Go to Service -> Tools and update DB views

6)Go to "tmp" folder and delete everything except ".htaccess"

7)Open Browser Settings and empty the cache

8)Close and reopen the Browser, go to the address and select the LV language

... what happens after all this is that the address opens as "http://<domain>/startseite/" and nothing apart from the Azure template loads

Last edited by karlis1989; 02-16-2012 at 10:41 AM.
Reply With Quote
#Top   #4  
Old 02-16-2012, 04:54 PM
spurvis's Avatar
spurvis spurvis is offline
Senior Member
Join Date: Oct 2010
Posts: 160
spurvis is on a distinguished road
Default Re: OXID CE 4.5 - Custom language

I remember it taking a lot of trial and error to get this working for me. Don't remember exactly what got the new language working but here's my current file structure relative to the new lang:

out/azure/fr/cust_lang.php
out/azure/fr/lang.php
out/azure/fr/map.php
out/azure/fr/theme_options.php
out/fr/cust_lang.php
out/fr/lang.php

I don't know, maybe you don't need the cust_lang files, but in my case I'm using them. Don't forget to change the $sLangName variable inside all the applicable lang files.
Reply With Quote
#Top   #5  
Old 02-16-2012, 05:36 PM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is offline
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,093
Marco Steinhaeuser is on a distinguished road
Default Re: OXID CE 4.5 - Custom language

Hi,

actually, it is pretty simple to install a new language...
Karlis, which exact version do you run?
As far as I understood, you replaced EN instead of installing a new language, right?

Regards
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #6  
Old 02-16-2012, 06:34 PM
karlis1989's Avatar
karlis1989 karlis1989 is offline
Junior Member
Join Date: Apr 2010
Location: Latvia
Posts: 20
karlis1989 is on a distinguished road
Send a message via Skype™ to karlis1989
Default AW: OXID CE 4.5 - Custom language

I have Community Edition - version 4.5.7 installed and set-up.

And no, first i attempted to add a additional new language(translated based on the English language files), but when that failed i moved out the actual non-working files and made copies of "EN" language files to make OXID think that those are the files for the newly added language(in the process i still uninstalled and installed the languages as according to the correct procedure of doing so).

It seems like OXID can't find the files and falls back to some default settings to still display the page, even so when there are no data to display but only a empty theme template

Last edited by karlis1989; 02-16-2012 at 06:37 PM.
Reply With Quote
#Top   #7  
Old 02-16-2012, 10:30 PM
karlis1989's Avatar
karlis1989 karlis1989 is offline
Junior Member
Join Date: Apr 2010
Location: Latvia
Posts: 20
karlis1989 is on a distinguished road
Send a message via Skype™ to karlis1989
Default AW: OXID CE 4.5 - Custom language

I simply cannot understand why it doesn't want to load the correct web page ... i have all the files copied correctly, the language installed in the OXID Admin panel correctly ... but it still stubbornly keeps loading " http://<domain>/startseite/" ... why? Is there a setting or a parameter in the MySQL database i'm missing/haven't set? It's like OXID doesn't see the language files.
Reply With Quote
#Top   #8  
Old 02-16-2012, 11:50 PM
spurvis's Avatar
spurvis spurvis is offline
Senior Member
Join Date: Oct 2010
Posts: 160
spurvis is on a distinguished road
Default Re: AW: OXID CE 4.5 - Custom language

The fact that it goes to http://<domain>/startseite isn't necessarily a bad thing, as long as you see your lang file changes within the content of the page. This is because the SEO names are set outside of the lang files and since German is the default second lang the SEO URLs will all remain German for your second shop language (whatever lang has id=1) until changed.

To change SEO URL names you have to Master Settings>Core Settings>SEO

Otherwise, there's also a "Enable Multiple Languages" setting under Master Settings>Core Settings>Perform., but it should be enabled already be default.
Reply With Quote
#Top   #9  
Old 02-17-2012, 08:46 AM
karlis1989's Avatar
karlis1989 karlis1989 is offline
Junior Member
Join Date: Apr 2010
Location: Latvia
Posts: 20
karlis1989 is on a distinguished road
Send a message via Skype™ to karlis1989
Default Re: OXID CE 4.5 - Custom language

And i got it working. Changed the order of the default English language and the newly added Latvian language and it now works propertly in the OXID interface, however it might have been working before but while battling it trough with the set-up of the language files i might have not noticed it earlier that i have to copy categories & products over to the new Language as well(all tho at one point i tried doing this and it didn't display the language).

Now, i just have to study the SEO Urls and create a suitable set-up so that it would display web pages/ categories as "http://<domain>/<category>/<product>.html" .... will have to start with the charecter replacement in SEO Urls.

How are the SEO settings set for the EN language? It seems the settings are secondary default, that are integrated inside the OXID code and come into effect if no custom settings are specified in the Admin panel...

Last edited by karlis1989; 02-17-2012 at 08:52 AM.
Reply With Quote
Reply

Bookmarks

Tags
custom, language

« Previous Thread | Next Thread »
Thread Tools
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
language-depending blocks (if language == en or smth. like that) demetrius Templates and Design 2 12-21-2010 05:03 PM
language custom file name change? workingprojectss Developers 1 07-12-2010 10:24 AM
Change backend language (/out/admin/nl)? New standard language Anne M Administration 6 03-14-2010 08:12 PM
Allow for hirarchical definition of language data between template and custom-template avenger Feature requests 1 01-08-2010 09:50 AM
Bug or Feature ? Installed 3rd Language "2" is activated the SEO URLs fail and display the first language "0" maxmix Installation and configuration 2 01-29-2009 11:32 AM

All times are GMT +1. The time now is 12:27 PM.