Uppercase To Function Turkish Characters

hello

Turkish characters

this

code


function strtoupperTR($str)
{
$str = str_replace(array(‘i’, ‘ı’, ‘ü’, ‘ğ’, ‘ş’, ‘ö’, ‘ç’), array(‘İ’, ‘I’, ‘Ü’, ‘Ğ’, ‘Ş’, ‘Ö’, ‘Ç’), $str);
return strtoupper($str);
}


where

Writing?

How do I make a modification and modification where necessary

or

solution !!!



HELP !!!

thanks

Unfortunately your question is not quite clear. You can put this function to the func.php file of the My changes module and use it in the templates in the following way:



{$your_variable|strtoupperTR}

Box titles, labels etc, uppercased by cs-cart. But not correct for Turkish.

for example, “i” must become " Ä° " when uppercased.

Unfortunately default converted as " I ".





i >> Ä°

ı >> I,

ö >> Ö,







WANTED: clever UPPERCASE convertion. for Turkish.



PHP function ready!

istanbul asks:

Where is the adding location for this function?

Hi, i will try to ask clearly.



Normaly uppercase converts “i” >>“I”



In Turkish Alpabet, “i” and “ı” different letters. “i” should be “Ä°” (with dot) and “ı” should be “I” (without dot).



Due to this reason, we need a function for some special characters. When i research in internet i found a function as below code box.


function strtoupperTR($str)
{
$str = str_replace(array(‘i’, ‘ı’, ‘ü’, ‘ğ’, ‘ş’, ‘ö’, ‘ç’), array(‘İ’, ‘I’, ‘Ü’, ‘Ğ’, ‘Ş’, ‘Ö’, ‘Ç’), $str);
return strtoupper($str);
}




But i dont know how to se in cs-cart. Where should i to put this codes and what setting should i do for correctly works.



Hope to hear some solution, kindly regards.

It depends on the place where you want to use this function. There is no universal way to apply it to all texts (product descriptions, pages content, language variables, etc)

All places, where i used UPPERCASE.

For old versions, I have solved this problem by disabling uppercase from css files


.sidebox-title span, .sidebox-title a {<br />
	color: #fff;<br />
	text-decoration: none;<br />
	/* text-transform: uppercase;	*/<br />
	font-weight: bold;<br />
	font-size: 90%;
```<br />
<br />
<br />
<br />
This problem looks css based.<br />
Mentioned here:<br />
http://stackoverflow.com/questions/3777443/css-text-transform-not-working-properly-for-turkish-characters

[quote name='user2008' timestamp='1437567272' post='223954']

For old versions, I have solved this problem by disabling uppercase from css files


.sidebox-title span, .sidebox-title a {
color: #fff;
text-decoration: none;
/* text-transform: uppercase; */
font-weight: bold;
font-size: 90%;








This problem looks css based.

Mentioned here:

http://stackoverflow…kish-characters

[/quote]



This is not solving, this is escaping. I want UPPERCASE but with true way.

HMM, CSS mechanism need modification according to Turkish, indian, indonesian, malay etc

National CSS needed? :)

[quote name='pcmemo' timestamp='1437565545' post='223948']

All places, where i used UPPERCASE.

[/quote]



I am afraid, there is no universal way to do it


function strtouppertr($str){
return mb_convert_case(str_replace(‘i’,’İ’,$str), MB_CASE_UPPER, “UTF-8″);
$upperTR = mb_convert_case(str_replace(array(“i”,”ı”),array(“İ”,”I”),$orjTR), MB_CASE_UPPER, “UTF-8″);
$lowerTR = mb_convert_case(str_replace(array(“İ”,”I”),array(“i”,”ı”),$orjTR), MB_CASE_LOWER, “UTF-8″);
$firstUpperTR = mb_convert_case(str_replace(array(“i”,”I”),array(“İ”,”ı”),$orjTR), MB_CASE_TITLE, “UTF-8″);
}

This function looks very good.

Thanks.



At cs-cart site, proper location for this code?