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.-

Helllo karlis,

[QUOTE=karlis1989;81743]the available tutorials(which are heavily outdated).
[/QUOTE]

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!

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

[B]EDIT[/B]: Didn’t seem to work :confused:

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
[I]/setup/
/out/admin/
/out/azure/
/out/basic/
/out/[/I]

2)Then rename them to “lv” so i end up with
[I]/setup/lv/
/out/admin/lv/
/out/azure/lv/
/out/basic/lv/
/out/lv/[/I]

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

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.

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

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

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.

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.

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…

Hallo,

ich brauche eure Hilfe weil ich nicht mehr weiß wie ich es ehemals mit den Spracheinstellungen gemacht habe (Alzheimer?):

Ich habe einen Update auf 4.6.0 Azure gefahren und bin dabei auch mit meinem mein_azure-Ordner in Berührung gekommen, wo ich ja alle individuellen Einstellungen drin habe. Dort gibt es den Ordner mein_azure/de und in diesem habe ich die Dateien cust_lang.php, lang.php, map.php und theme_options.php. Das sind dieselben Dateien die auch im Ordner azure/de sind. Ich habe irgendwann im Forum mal gelesen dass man das so einstellen muss. Also dass in beiden Ordnern dasselbe stehen muss. Trügt mich da mein Gedächtnis oder stimmt das wirklich so?

Bitte helft meinem Gedächtnis auf die Sprünge. Vielen Dank schon mal.

Albert