Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

How to use TurkishUtf8 #30

Closed
fisharebest opened this issue Sep 12, 2014 · 2 comments
Closed

How to use TurkishUtf8 #30

fisharebest opened this issue Sep 12, 2014 · 2 comments

Comments

@fisharebest
Copy link
Contributor

The documentation mentions a TurkishUtf8 class, but does not say how to use it.

// bootstrap.php
if ($language == 'tr') {
    // What goes here?
} else {
    \Patchwork\Utf8\Bootup::initAll();UTF-8
    \Patchwork\Utf8\Bootup::filterRequestUri();
    \Patchwork\Utf8\Bootup::filterRequestInputs();
}
@fisharebest
Copy link
Contributor Author

I think I understand now. I must write my own function.

function my_strtoupper($x) {
  global $language;
  if ($language == 'tr' || $language == 'az') {
    return Utf8Turkish::strtoupper($x);
  } else {
    return Utf8::strtoupper($x);
  }
}

@nicolas-grekas
Copy link
Contributor

Right, you got it!

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

No branches or pull requests

2 participants